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

@yang-29/vctrs-wasm

v0.3.0

Published

vctrs vector database for WebAssembly

Readme

@yang-29/vctrs-wasm

A fast vector database that runs in the browser via WebAssembly. ~220KB, zero dependencies.

Same Rust core as the Python and Node.js bindings.

Install

npm install @yang-29/vctrs-wasm

Usage

import init, { VctrsDatabase } from "@yang-29/vctrs-wasm";

await init();

const db = new VctrsDatabase(384, "cosine");

db.add("doc1", new Float32Array(embedding), { title: "hello" });
db.add("doc2", new Float32Array(embedding2), { title: "world" });

const results = db.search(new Float32Array(query), 5);
for (const r of results) {
  console.log(r.id, r.distance, r.metadata);
  r.free();
}

db.free();

CDN (no bundler)

<script type="module">
import init, { VctrsDatabase } from "https://unpkg.com/@yang-29/vctrs-wasm/vctrs_wasm.js";
await init();
const db = new VctrsDatabase(4, "cosine");
</script>

API

| Method | Description | |--------|-------------| | new VctrsDatabase(dim, metric) | Create database. Metrics: "cosine", "euclidean", "dot" | | db.add(id, vector, metadata) | Add vector (Float32Array) with optional metadata | | db.upsert(id, vector, metadata) | Insert or update | | db.search(vector, k) | Find k nearest neighbors → SearchResult[] | | db.delete(id) | Delete by ID → boolean | | db.contains(id) | Check existence → boolean | | db.length | Vector count | | db.dim | Dimensionality |

SearchResult has .id, .distance, .metadata properties. Call .free() when done.

Notes

  • Runs entirely in-memory — no persistence across page reloads
  • Call .free() on results and the database to avoid memory leaks
  • Single-threaded (no SIMD/BLAS) — suitable for datasets under ~10k vectors