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

@deltalaboratory/uuid

v0.3.3

Published

A lightweight UUID library for JavaScript/TypeScript with UUIDv4 and UUIDv7 support, offering efficient 22-character encoding and timestamp extraction.

Readme

@deltalaboratory/uuid

A lightweight UUID library for JavaScript/TypeScript with V4 and V7 support, offering efficient 22-character encoding and timestamp extraction.

Installation

npm install @deltalaboratory/uuid

Usage

Basic UUID Creation

import { UUID } from '@deltalaboratory/uuid'

// Create UUIDv4 (random)
const uuid4 = UUID.v4()

// Create UUIDv7 (time-based)
const uuid7 = UUID.v7()

console.log(uuid4.toString()) // "3b1caf7e-1b9a-482d-bf3a-7e9d6b5a0c1a"
console.log(uuid7.encode()) // "2AXQKkZTWq63x77hN8w9Wc"

Format Conversion

// Standard UUID format to compact encoding
const fullUuid = new UUID('f47ac10b-58cc-4372-a567-0e02b2c3d479')
console.log(fullUuid.encode()) // "8HysC1jMR3KlZw4CssPUeQ"

// Compact encoding to standard format
const shortId = '5RCDi5zTRVmxh4EHAYj3sV'
const decoded = UUID.decode(shortId)
console.log(decoded.toString()) // "e51083c3-9cd3-4559-b187-810708f7b159"

Timestamp Extraction (V7)

const meetingId = UUID.v7()
console.log(meetingId.time()) // 1717741612014 (Unix timestamp in ms)
console.log(new Date(meetingId.time()).toISOString()) // "2024-06-07T12:26:52.014Z"

Key Features

  • Dual Format Support

    • toString(): Standard 36-character format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
    • encode(): Compact 22-character URL-safe format
  • Version Support

    • UUID.v4(): Random-based UUIDs (RFC 4122)
    • UUID.v7(): Time-ordered UUIDs with embedded timestamps
  • Efficient Encoding

    • 22-character format uses base64url encoding (vs 36-char standard)
    • Maintains byte compatibility with standard UUIDs
  • Timestamp Support

    • Extract embedded millisecond timestamp from V7 UUIDs
    • Direct time-ordered sorting capability

Compatibility

Works in all modern browsers (Chrome 92+, Firefox 90+, Edge 92+) and Node.js 16+
Requires global crypto.getRandomValues support (available by default)