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

vt9nx

v0.0.3

Published

- extracts text from vue templates - outputs templates with text replaced by translation expressions - outputs ``en.json`` with all translatable expressions

Readme

Vue t9n eXtract

  • extracts text from vue templates
  • outputs templates with text replaced by translation expressions
  • outputs en.json with all translatable expressions

Keys

  • prefix is path.to.vue_file relative to folder src (if applicable)
  • plus the text chopped to maximum 5 words in snake_case. key uniqueness is enforced by adding a number at the end if same key exists but with diffrent content

translatable text

  • only template content is supported

Usage

USAGE

     vt9nx <command> [options]

   COMMANDS

     extract                      replace strings with translation expressions add them to dictionay
     chkey <oldKey> <newKey>      change a translation string's key
     help <command>               Display help for a specific command


     vt9nx extract

   OPTIONS

     -l, --local [dictionay-path]      <lan>.json path    optional      default: "src/locales/en.json"
     -s, --src  [files]                source             optional      default: "src/**/*.vue"
     -d, --dest [output-dir]           output dir         optional      default: "src"
     -t, --func [translation-fn]       t9n function       optional      default: "$t"

Given:

src/views/myView.vue

<template>
<div>
    <label for="state">Price (USD)</label>
    <strong class="js-tpl-litteral">{{`js tpl litteral ${domething * 100} times`}}</strong>
    <span class="simple">some text</span>
    <div class="indented">
      text with spaces
    </div>
    <p class="duplicate">text with spaces/p>
    <div class="another-binding">{{daysRemaining}} days left</div>
    <p class="br">
      text before br
      <br>
      text after br
    </p> 
    <p class="long multiline">
      Long text Lorem Ipsum is simply dummy 
      text of the printing and typesetting industry. 
    </p>
    <section class="long-same-start">
      Long text Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
      diffrent end
    </section>
  </div>
</template>
<script>...</script>
...

Doing:

$ npx vt9nx extract
# or
$ npm install -g vt9nx
$ vt9nx extract

Results in:

src/locales/en.json

{
    "views": {
        "my_view": {
            "price_usd": "Price (USD)"
        }
    }
}

***src/views/myView.vue

<template>
  <div>
    <label for="state">{{ $t('views.my_view.price_usd') }}</label>
    <strong class="js-tpl-litteral">{{ $t('views.example.js_tpl_litteral_domething', {domething100:domething * 100}) }}</strong>
    <span class="simple">{{ $t('views.my_view.some_text') }}</span>
    <div class="indented">
      {{ $t('views.my_view.text_with_spaces') }}
    </div>
    <p class="duplicate">{{ $t('views.my_view.text_with_spaces') }}</p>
    <div class="another-binding">{{ $t('views.my_view.days_remaining_days_left', {daysRemaining:daysRemaining}) }}</div>
    <p class="br">
      {{ $t('views.my_view.text_before_br') }}
      <br/>
      {{ $t('views.my_view.text') }}
    </p>
    <p class="long multiline">
      {{ $t('views.my_view.long_text_lorem_ipsum_is') }}
    </p>
    <section class="long-same-start">
      {{ $t('views.my_view.long_text_lorem_ipsum_is') }}
    </section>
  </div>
</template>
<script>...</script>