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

i18n-utils

v0.5.0

Published

The i18n tag function utilities

Readme

i18n-utils

The i18n tag function utilitities.

donate License: ISC

Related post.

Features

  • write strings in your language, transparently show translations without changing your code
  • created databases are usable through 10 lines of 100% cross browser JavaScript
  • you handle translations either one after the other or in bulks
  • you update only what changed, you never waste time scanning the rest
  • you can swap indexes. Date ${0}/${1}/${2} can be translated as Data ${2}/${0}/${1}
  • automatic clean of the DB. If you change or remove a template literal the DB won't contain it anymore

Possible future improvements

  • dynamic change of index names so instead of ${0}/${1} you can specify ${'year'}/${'month'} in every translation
  • use a simple client/server one way hash for strings as key to reduce raw DB size

Quick Introduction

If you'd like to make your code i18n ready you can use the i18n-dummy module which provides a noop function tag.

// anywhere you need to write future proof code
// use template literals and put i18n in front
const greetings = i18n`Hello ${user.name}!`;

Once you have put the i18n function tag in front of all sentences that need translations, you can install this utility and point at the main entry point of your program:

# you could use -g too
npm install i18n-utils

# if you have latest npm use the binary
npx i18n-utils src/main.js

At this point you just need to follow instructions until a browser page opens, giving you all the found sentences that need translation in other languages you've specified.

Once you've translated all languages you can install and use i18n-yummy function which expects a runtime locale and a database to use.

Specify both and see that changing locale will produce automatically sentences in the different language.

test.js example

// somehow include the client library
const i18n = require('i18n-yummy');

// specify the locale to display
// and the database to use
i18n.locale = 'it';
i18n.db = require('./i18n.db.json');

// write content in the language you used
// as default to setup the database (en)
console.log(i18n`Hello ${'i18n'}!`);

Try to save above file as test.js and then i18n-utils ./test.js providing it as translation language and writing Ciao instead of Hello in the dedicated area.

If you'll node test.js after you will see the output will be Ciao i18n! instead of Hello i18n!.