Security & IDv1.0.0
@sopkit/uuid
Cryptographically secure, lightweight UUID v4 and v1 generator/validator.
Overview
Provides cryptographically secure random identifiers (v4) using global Web Crypto API and timestamp-based (v1) UUIDs. Optimized for high concurrency, zero-dependency, and extreme performance.
Installation
npm install @sopkit/uuid
Quick Start (ESM)
import { v4, validate } from "@sopkit/uuid";
const id = v4(); // "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
console.log(validate(id)); // trueAPI Reference
v4(): stringGenerates a secure UUID v4.
v1(): stringGenerates a timestamp-based UUID v1.
validate(uuid: string): booleanValidates string structure.
Rivals Comparison
How @sopkit/uuid compares against the typical industry standard (uuid):
Size
1.4 KB12 KB
Dependencies
0 (Zero dependencies)2+ dependencies
Standard Support
Native Web Crypto APIRequires Node runtime shims
SopKit Guarantee
All libraries in the SopKit ecosystem are guaranteed to have zero server calls, zero analytical trackers, and 100% client-side privacy-first execution.