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

@gid128/core

v0.0.4

Published

GID-128 sortable 128-bit identifiers with Rust-native Node support, 22-character text, and opaque public tokens.

Readme

@gid128/core

GID-128 is a fast, time-sortable identifier system built for production use across Node and browser runtimes.

It gives you:

  • 16-byte canonical binary storage for database indexing.
  • 22-character gid_s text for URLs, logs, and APIs.
  • 22-character gid_x public-token text for hiding timestamp and sort order.
  • Rust-native Node runtime for production speed.

Why teams use it:

  • Faster generation than common ID libraries in measured JS benchmarks.
  • Node benchmark results on Apple M4 / darwin arm64:

| Library | Ops/sec | GID speed | | --- | ---: | ---: | | gid128/generate | 19.1M | 1.000x | | uuid/v4 | 10.0M | 1.907x slower | | nanoid | 8.7M | 2.202x slower | | xid-js | 4.8M | 3.987x slower | | uuid/v7 | 1.2M | 16.223x slower | | cuid | 492K | 38.792x slower | | ksuid | 266K | 71.614x slower | | ulid | 78K | 244.121x slower | | cuid2 | 9.9K | 1934.866x slower |

  • Benchmarks compare against UUID v4, UUID v7, ULID, NanoID, KSUID, XID, and CUID-style generators where available.
  • The benchmark gate is release-blocking and records the measured winners in the repo.
  • Canonical binary storage for clean database indexing.
  • Public tokens that do not expose timestamp order.
  • One spec across JS and Python, with the same test vectors.

Install:

npm install @gid128/core
import {
  gid,
  parse,
  publicEncode,
  publicDecode,
  publicEncodeWithKeyId,
  publicDecodeWithKeyring,
  encodeTime,
  withPrefix
} from "@gid128/core";

const id = gid();
const text = id.toString();
const bytes = id.toBytes();
const timestamp = id.timestampMs();

const key = crypto.getRandomValues(new Uint8Array(32));
const publicId = publicEncode(id, key);
const original = publicDecode(publicId, key);
const keyedPublicId = publicEncodeWithKeyId(id, { kid: "k1", key });
const alsoOriginal = publicDecodeWithKeyring(keyedPublicId, { k1: key });
const timePrefix = encodeTime(id.timestampMs());
const orderId = withPrefix("order", id);

parse(text).equals(original);
parse(text).equals(alsoOriginal);

publicId is the canonical 22-character gid_x. keyedPublicId is a key-rotation wrapper for public distribution, not canonical gid_x.

Browser usage is ESM/bundler-compatible and requires globalThis.crypto.getRandomValues.

customAlphabet, customRandom, and nonSecure create display-only IDs. They do not replace canonical 22-character GID-128 text.

Use gid_s for database storage and internal identity. Use gid_x when public URLs or API output should hide timestamp and sort order. Use bytes when you need compact binary storage or indexed joins.

Recommended keywords for npm:

  • gid
  • gid128
  • sortable-id
  • identifier
  • uuid
  • ulid
  • nanoid
  • ksuid
  • timestamp
  • public-token
  • crypto
  • node
  • browser
  • benchmark
  • performance
  • uuidv7
  • ulid

Local validation:

npm run validate