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

odoid

v1.0.2

Published

Deterministic mixed-radix ID encoding — maps 64-bit unsigned integers to 6, 7, or 8-character alphanumeric strings.

Readme

odoid

Deterministic mixed-radix ID encoding. Maps a 64-bit unsigned integer to a 6, 7, or 8-character alphanumeric string with a serial-number aesthetic.

0A0000   →  0
0D7NM7   →  1234567
ZZ9ZZZZZ →  236223201279

Features

  • Deterministic — same integer + length always produces the same string, and vice-versa.
  • Human-readable — ambiguous characters I, L, O are excluded from all positions.
  • Fixed positional structure — position 1 is always a letter, position 2 is always a digit.
  • 64-bit safe — all arithmetic uses BigInt internally.
  • Tiny — zero runtime dependencies.

Install

npm install odoid

Usage

Encode

import { encode } from "odoid";

encode(0n, 6);          // "0A0000"
encode(1234567n, 6);    // "0D7NM7"
encode(1234567n, 7);    // "0A15NM7"
encode(236223201279n, 8); // "ZZ9ZZZZZ"

encode(n, length?) accepts both number and bigint. Default length is 6.

Decode

import { decode } from "odoid";

decode("0A0000");   // 0n
decode("0D7NM7");   // 1234567n
decode("0A15NM7");  // 1234567n

Returns bigint. Input is uppercased before lookup, so lowercase letters that are valid in the charset are accepted.

OdoIDGenerator

A time-seeded, namespace-scoped monotonic generator:

import { OdoIDGenerator } from "odoid";

const g = new OdoIDGenerator({ namespace: "orders", length: 7 });

const { id, n } = g.next();
// id  → e.g. "3H5NV2K"
// n   → the raw bigint

Lengths and Capacity

| Length | Max integer (exclusive) | |--------|------------------------| | 6 | 230,686,720 | | 7 | 7,381,975,040 | | 8 | 236,223,201,280 |

Errors

| Error | When | |-------|------| | OverflowError | n < 0 or n >= MAX[length] | | UnsupportedLengthError | length is not 6, 7, or 8 | | InvalidCharacterError | character not in positional charset during decode |

All three extend RangeError.

Specification

See SPEC.md for the full processing instruction document.

License

MIT