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

@sveltekit-i18n/extension-stores

v3.0.0

Published

Svelte store consumption mode for @sveltekit-i18n/base.

Readme

@sveltekit-i18n/extension-stores

A Svelte store consumption mode for @sveltekit-i18n/base v3.

Base v3 exposes one runes-based reactive instance. This extension replaces that surface with the store-shaped API known from v2 — for consumers who prefer $t(...) auto-subscriptions, or are migrating gradually.

Install

npm i -D @sveltekit-i18n/base @sveltekit-i18n/extension-stores

Usage

Add the extension to config.extensionsnew I18n(...) then evaluates to the store-shaped output:

import I18n from '@sveltekit-i18n/base';
import stores from '@sveltekit-i18n/extension-stores';

export const { t, l, locale, loading, loadTranslations } = new I18n({
  ...config,
  extensions: [stores],
});
<h1>{$t('common.title')}</h1>

The extension can also be applied to an existing instance directly — stores(i18n) returns the same output (memoized per instance).

The output is typed from the instance it wraps, so what the config narrows — the schema keys and payloads behind t/l, the locale union behind locale and setLocale — survives the pipe.

Output

Stores

Every store also carries a get() method for a subscription-free read of the current value.

| Store | Type | Description | |-------|------|-------------| | t | readable | Translation function for the active locale: $t('key', ...params). A fresh function is emitted whenever the translations, the locale or the config change. | | l | readable | Locale-explicit translation function: $l('en', 'key', ...params). Emitted the same way as t. | | locale | writable | The active locale. Setting it (locale.set('en'), $locale = 'en') triggers a fire-and-forget locale switch; the store emits once the switch completes. A falsy value is ignored, exactly as it is on the instance. For an awaitable switch, use setLocale. | | locales | readable | All configured locales. | | loading | readable | true while translation loads are in flight. | | initialized | readable | true once the first translations have been loaded. | | translations | readable | The loaded translation tables. | | rawTranslations | readable | The loaded translation tables before preprocessing. |

Methods

loadTranslations, setLocale, setRoute, loadConfig, addTranslations, invalidate, snapshot and destroy are passed through from the instance, pre-bound — safe to destructure.

instance

The untouched I18n instance, as an escape hatch to the full runes-based API.

Migrating from v2

The store shape matches sveltekit-i18n v2 with these differences:

  • loading.toPromise() was removed — await loadTranslations / setLocale / setRoute directly.
  • locale.forceSet() was removed — use invalidate() plus setLocale().

Issues

Please report issues here.