npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stalkerg/precompile-intl-runtime

v1.0.1

Published

Runtime helpers to be used in translations precompiled by babel-plugin-precompile-intl

Downloads

472

Readme

@stalkerg/precompile-intl-runtime

Internal Svelte 5 runtime used by @stalkerg/svelte-icu and the precompiled ICU message functions.

The runtime has two layers:

  • pure TypeScript lookup, locale fallback, loaders, and cached Intl helpers;
  • an instance-based I18n state core implemented in a .svelte.ts module and exposed through a callable function facade.

There is no mutable module-level locale, dictionary, or loading store. An I18n instance owns the mutable data for one component tree/request, while immutable loader results and Intl formatter caches may safely be shared.

An instance translates directly with i18n('key', values). The small facade is not a Proxy; it delegates to private rune state. The temporary i18n.t alias from the first two alphas was removed instead of maintaining two spellings for the same operation.

syncDocumentLanguage(i18n) is an optional, tree-shakeable Svelte effect that keeps the browser's <html lang> attribute synchronized with an instance. It does not run during SSR and is never enabled merely by importing the package.

setMessages(locale, catalog) installs a complete loaded catalog and replaces the previous setMessages layer for that locale. addMessages is the separate API for accumulating partial overlays. Partial catalogs are applied in argument order even when one spells a key as account.title and another spells the same key as { account: { title: ... } }.

Most users should install and import @stalkerg/svelte-icu instead of this package directly. See the migration guide. This runtime package requires Node 24.11.0 or newer and is ESM-only.

The generated-helper contract preserves ICU semantics for the supported MF1 subset: it distinguishes missing own properties from supplied values, validates argument types, formats typeless numbers and dates with the message locale, uses half-even rounding, and evaluates complex-message fragments lazily. The runtime still accepts the v2 helper call shapes emitted by the stable 1.0.0 compiler so previously generated catalogs remain executable after an upgrade.