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

@vinary-tree/javascript-runtime

v4.0.0-rc.5

Published

Single-instance JavaScript runtime for related Vinary Tree libraries

Readme

Vinary Tree JavaScript runtime

@vinary-tree/javascript-runtime is the single-instance JavaScript runtime for libdictenstein, liblevenshtein, lling-llang, and duallity. It lets their project-specific facades exchange retained dictionaries and weighted finite-state transducers (WFSTs) without copying or loading incompatible native runtimes.

| Release property | Value | |---|---| | Candidate | 4.0.0-rc.5 | | npm dist-tag | next | | Node | 22.14 or newer | | Backends | Native N-API, browser WebAssembly, Node WASI | | License | Apache-2.0 |

Install the release candidate

npm install @vinary-tree/javascript-runtime@next

Use the package root for Node's native backend, @vinary-tree/javascript-runtime/wasm in a browser, or @vinary-tree/javascript-runtime/wasi when Node/WASI filesystem preopens are needed. Applications normally install a project facade rather than importing the shared runtime directly.

Natural JavaScript collections and resources

Dictionaries follow the synchronous Map vocabulary while retaining explicit native lifetime control:

import { libdictenstein, liblevenshtein } from "@vinary-tree/javascript-runtime";

using dictionary = libdictenstein.dynamicDawg("unicode");
dictionary.set("cat", 1n).set("cot", 2n).set("cut", null);

using transducer = liblevenshtein.transducer(dictionary);
using matches = transducer.query("cat", 1, "distance-then-term");

for (const { term, distance, id } of matches) {
  console.log(term.value, distance, id);
}

size, set, get, has, delete, entries, keys, values, forEach, and [Symbol.iterator] mirror familiar collection behavior. Ordinary iteration materializes one host-owned immutable revision, so early loop exit leaks no native cursor. Large traversals use streamEntries(), a bounded iterator with nextBatch, reduceBatches, return, close, and Symbol.dispose.

The same ownership rule applies to query cursors, phonetic patterns, rule sets, builders, transducers, and WFSTs: prefer using or call close() in finally. Garbage collection is exceptional-path containment, not resource scheduling.

Backend contract

| Import | Backend | Intended host | |---|---|---| | @vinary-tree/javascript-runtime | Prebuilt N-API addon | Node services and tools | | @vinary-tree/javascript-runtime/wasm | wasm-bindgen module | Browsers and web workers | | @vinary-tree/javascript-runtime/wasi | Explicit WASI linear-memory ABI | Node with preopened persistent storage |

All three expose the same snapshot, collection, query, and WFST semantics. Resources carry an immutable runtime identity; passing a resource between different package instances fails before native dispatch.

Standalone local development

The runtime is intentionally not nested in any core project. Put the five family repositories beside this one, synchronize them to the release version, then construct the development-only overlay and relocatable native SDK:

npm run configure:local
npm run bootstrap:native
npm run build:native:release
npm run stage:native
npm run test:native

configure:local writes an ignored .cargo/config.toml containing exact local crate patches and portable Gxhash intrinsic requirements. bootstrap:native builds the four public static libraries and stages them with the canonical headers under .build/native-sdk; binding.gyp never reaches into sibling directories.

Documentation

The project-specific packages own their idiomatic user APIs. This repository owns only the common native/WASM/WASI implementation, runtime identity, package assembly, and cross-project integration tests.