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

nope-id

v1.4.1

Published

A tiny, fast, secure, URL-friendly unique string ID generator. ESM & CommonJS. Nanoid alternative with extra features (prefixed IDs, sortable IDs, UUID, distributed IDs).

Readme

nope-id

🌐 Full documentation: English · Türkçe · Русский

A tiny, secure, URL-friendly unique string ID generator for JavaScript.

A faster, more secure alternative to nanoid with extra features!

  • Faster - 1.4x to 3x faster than nanoid (CSPRNG, full URL-safe alphabet); wins all 5 core benchmarks (see benchmarks)
  • Security Hardened - Reduced timing-leak validators, modulo bias elimination, prototype pollution protection (see security)
  • Well Tested - 408 tests including security & entropy tests (see testing)
  • Cryptographically Secure - Uses webcrypto.getRandomValues() (CSPRNG)
  • Zero Dependencies - No external dependencies
  • URL-safe - Uses A-Za-z0-9_- characters
  • Dual Module - Works with both ESM (import) and CommonJS (require)
  • TypeScript - Full type definitions included
  • Collision-resistant - Strictly-monotonic sortable IDs, origin-tagged distributed IDs
  • Many ID Formats - UUID v4 & v7, ULID (spec-compliant + monotonic factory), Snowflake, MongoDB ObjectId
  • Extra Features - Prefixed IDs, sortable IDs, Sqids (reversible encoding), typed IDs, format validators, and more!

Installation

npm install nope-id

Quick Start

ES Modules (import)

import { nopeid } from 'nope-id'

const id = nopeid() // "V1StGXR8_Z5jdHi6B-myT"

CommonJS (require)

const { nopeid } = require('nope-id')

const id = nopeid() // "V1StGXR8_Z5jdHi6B-myT"

Default Export

// ES Modules
import nopeid from 'nope-id'
const id = nopeid() // "V1StGXR8_Z5jdHi6B-myT"

// CommonJS
const nopeid = require('nope-id')
const id = nopeid() // "V1StGXR8_Z5jdHi6B-myT"

More Examples

Custom alphabets (full API reference):

import { customAlphabet } from 'nope-id'

const hexId = customAlphabet('0123456789abcdef', 16)
hexId()   // "4f90d13a42f17f80"
hexId(8)  // "a3b2c1d4"

Prefixed IDs for database entries (more):

import { prefixedId } from 'nope-id'

prefixedId('user')           // "user_V1StGXR8_Z5jdHi6B-myT"
prefixedId('order', 10)      // "order_IRFa-VaY2b"
prefixedId('prod', 8, '-')   // "prod-Z5jdHi6B"

Sortable, strictly-monotonic IDs (more):

import { orderedId } from 'nope-id'

orderedId()                   // "1okw67hF111114mDXU1ez" (21-char Base58, sortable)
orderedId() < orderedId()     // true (strictly increasing, clock-rewind safe)
orderedId.many(1000)          // 1000 sortable IDs, faster than a loop
orderedId.parse('1okw67hF111114mDXU1ez') // { timestamp: Date, counter, random }

UUID v4 & v7, ULID and more (all formats):

import { uuid, uuidv7, ulid, decodeTime } from 'nope-id'

uuid()              // "e2ef524f-bce6-4c4e-b7dd-2c4b3a6e1d0f" (v4)
uuidv7()            // "0192f3c1-8e2a-7b3c-9d4e-5f60718293a4" (time-ordered)
ulid()              // "01ARZ3NDEKTSV4RRFFQ69G5FAV"
decodeTime(ulid())  // Date

Secure bearer tokens — API keys, session tokens (more):

import { secureToken, apiKey } from 'nope-id'

secureToken()          // 48-char URL-safe token (unpooled, raw bytes zeroized)
apiKey('sk_live', 40)  // "sk_live_<40 chars>"

Documentation

The full documentation lives in docs/README.md (also available in Türkçe and Русский):

Performance

The core head-to-head vs the latest installed nanoid (auto-refreshed by CI on every PR):

Last refreshed: 2026-07-16, Node v26.x, ubuntu-latest (GitHub Actions).

| Test | nanoid 6.0.0 | nope-id | Winner | |------|--------|---------|--------| | Basic (21 chars) | ~27.4M ops/sec | ~58.2M ops/sec | nope-id ~2.1x | | Small (10 chars) | ~36.9M ops/sec | ~52.2M ops/sec | nope-id ~1.4x | | Large (64 chars) | ~10.8M ops/sec | ~33.8M ops/sec | nope-id ~3.1x | | Custom Alphabet | ~32.8M ops/sec | ~70M ops/sec | nope-id ~2.1x | | Batch (100 IDs) | ~269K ops/sec | ~779K ops/sec | nope-id ~2.9x |

Changelog

See the GitHub Releases page for the detailed changelog.

License

MIT