{"_id":"@billdaddy/uuidkit","_rev":"2-8eaf78959a059adfe68fe6d5d3b643bd","name":"@billdaddy/uuidkit","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@billdaddy/uuidkit","version":"0.1.0","keywords":["uuid","uuidv4","uuidv7","guid","rfc9562","time-ordered","sortable","crypto","validate","typescript","zero-dependency"],"author":{"url":"https://github.com/trananhtung","name":"Tung Tran"},"license":"MIT","_id":"@billdaddy/uuidkit@0.1.0","maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"homepage":"https://github.com/trananhtung/uuidkit#readme","bugs":{"url":"https://github.com/trananhtung/uuidkit/issues"},"dist":{"shasum":"316ab4e7497b43263d3b4c404997847661b712a0","tarball":"https://registry.npmjs.org/@billdaddy/uuidkit/-/uuidkit-0.1.0.tgz","fileCount":9,"integrity":"sha512-w4lhVrhzZYBSJicDj+wtyo6w85J++XiOarJfvp66Qj8DOeWqH3HGwICfQEZkVAs7eWwiaCfr9IjGpQQ9CM4JkA==","signatures":[{"sig":"MEQCIEl0vofHem0ilGOF3dYgPKA4JnCzB3MdnumNcb5dH74vAiAPuXSispRG5AWua/mX/CdHZ3WC9rseS2M+Edbnkx6AvQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28246},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c315ea8e3726431a6aad45edd40ec88345311055","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"billdaddy","email":"tunganhtran94@gmail.com"},"repository":{"url":"git+https://github.com/trananhtung/uuidkit.git","type":"git"},"_npmVersion":"11.5.2","description":"Tiny, isomorphic UUID toolkit — crypto v4 and time-ordered v7, plus validate, version, parse, and stringify. Zero dependencies.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.2","@types/node":"^20.17.10"},"_npmOperationalInternal":{"tmp":"tmp/uuidkit_0.1.0_1782085630028_0.46355267722857363","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@billdaddy/uuidkit","version":"0.1.1","description":"Tiny, isomorphic UUID toolkit — crypto v4 and time-ordered v7, plus validate, version, parse, and stringify. Zero dependencies.","keywords":["uuid","uuidv4","uuidv7","guid","rfc9562","time-ordered","sortable","crypto","validate","typescript","zero-dependency"],"license":"MIT","author":{"name":"Tung Tran","url":"https://github.com/trananhtung"},"homepage":"https://github.com/trananhtung/uuidkit#readme","repository":{"type":"git","url":"git+https://github.com/trananhtung/uuidkit.git"},"bugs":{"url":"https://github.com/trananhtung/uuidkit/issues"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"devDependencies":{"@types/node":"^20.17.10","tsup":"^8.3.5","typescript":"^5.7.2","vitest":"^2.1.8"},"sideEffects":false,"publishConfig":{"access":"public"},"_id":"@billdaddy/uuidkit@0.1.1","gitHead":"416745f2c6773b0ca5b7dc2b8aead9fb507835ab","_nodeVersion":"20.18.2","_npmVersion":"11.5.2","dist":{"integrity":"sha512-xQcrpvrm6wRKpOSBYcYX1dBaT28fTKvYC+UFQ9nP/ZwulrQJpHXRrmrEHszCRnUYbYwfb/6Un1J0RGFRlVGXZw==","shasum":"420cc46efbe923dc1bf5010abd74c84ec795501c","tarball":"https://registry.npmjs.org/@billdaddy/uuidkit/-/uuidkit-0.1.1.tgz","fileCount":9,"unpackedSize":29466,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDPqddCiNr6bt597rwuJOQfkDG2PSzncHZ5YzAanW+Z2gIgC2qN/QxIBFACSrYj9KTaC3ZosOo/pzky63u0RYesX8w="}]},"_npmUser":{"name":"billdaddy","email":"tunganhtran94@gmail.com"},"directories":{},"maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/uuidkit_0.1.1_1782140445622_0.8339465328156621"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T23:47:09.846Z","modified":"2026-06-22T15:00:45.888Z","0.1.0":"2026-06-21T23:47:10.172Z","0.1.1":"2026-06-22T15:00:45.754Z"},"bugs":{"url":"https://github.com/trananhtung/uuidkit/issues"},"author":{"name":"Tung Tran","url":"https://github.com/trananhtung"},"license":"MIT","homepage":"https://github.com/trananhtung/uuidkit#readme","keywords":["uuid","uuidv4","uuidv7","guid","rfc9562","time-ordered","sortable","crypto","validate","typescript","zero-dependency"],"repository":{"type":"git","url":"git+https://github.com/trananhtung/uuidkit.git"},"description":"Tiny, isomorphic UUID toolkit — crypto v4 and time-ordered v7, plus validate, version, parse, and stringify. Zero dependencies.","maintainers":[{"name":"billdaddy","email":"tunganhtran94@gmail.com"}],"readme":"# uuidkit\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\n> Tiny, **isomorphic** UUID toolkit — crypto `v4` and **time-ordered `v7`**, plus `validate`, `version`, `parse`, and `stringify`. **Zero dependencies**.\n\n[![CI](https://github.com/trananhtung/uuidkit/actions/workflows/ci.yml/badge.svg)](https://github.com/trananhtung/uuidkit/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@billdaddy/uuidkit.svg)](https://www.npmjs.com/package/@billdaddy/uuidkit)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/@billdaddy/uuidkit)](https://bundlephobia.com/package/@billdaddy/uuidkit)\n[![types](https://img.shields.io/npm/types/@billdaddy/uuidkit.svg)](https://www.npmjs.com/package/@billdaddy/uuidkit)\n[![license](https://img.shields.io/npm/l/@billdaddy/uuidkit.svg)](./LICENSE)\n\nYou need a UUID and you need it to work in Node, the browser, and the edge — and\nincreasingly you want **v7**, the time-ordered format that makes great database\nkeys. `uuidkit` does both `v4` and `v7` over the Web Crypto RNG, with the\nvalidate/parse helpers you reach for. **Zero dependencies**.\n\n```ts\nimport { v4, v7 } from \"@billdaddy/uuidkit\";\n\nv4(); // \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"  (random)\nv7(); // \"018f8e7a-1c2d-7abc-8def-0123456789ab\"  (time-ordered, sortable)\n```\n\n## Why uuidkit?\n\n- **v4 and v7.** Random when you want unpredictability, **v7** when you want keys\n  that sort by creation time (better index locality than random UUIDs).\n- **Isomorphic & secure.** Backed by `crypto.getRandomValues` — identical in\n  Node 18+, Deno, Bun, and browsers. No `Buffer`, no Node `crypto` import.\n- **The helpers you actually use.** `validate` (versions 1–8 + NIL/MAX),\n  `version`, and byte-level `parse` / `stringify`.\n- **RFC 9562 correct.** Proper version and variant bits.\n- **Zero dependencies**, ESM + CJS + types, tree-shakeable.\n\n## Install\n\n```bash\nnpm install @billdaddy/uuidkit\n# or: pnpm add @billdaddy/uuidkit  /  yarn add @billdaddy/uuidkit  /  bun add @billdaddy/uuidkit\n```\n\n## Generate\n\n```ts\nimport { v4, v7 } from \"@billdaddy/uuidkit\";\n\nv4();          // random UUID v4\nv7();          // UUID v7 for \"now\"\nv7(timestamp); // pin the millisecond timestamp (tests, backfills)\n```\n\nUUID v7 packs a 48-bit Unix-millisecond timestamp into the high bits, so the\nstrings sort chronologically:\n\n```ts\n[v7(3000), v7(1000), v7(2000)].sort();\n// → the 1000, 2000, 3000 order\n```\n\n## Validate & inspect\n\n```ts\nimport { validate, version } from \"@billdaddy/uuidkit\";\n\nvalidate(\"f47ac10b-58cc-4372-a567-0e02b2c3d479\"); // true\nvalidate(\"not-a-uuid\");                            // false\nversion(\"018f8e7a-1c2d-7abc-8def-0123456789ab\");   // 7\nversion(\"nope\");                                   // null\n```\n\n`validate` accepts versions 1–8 with the correct variant bits, plus the special\nNIL and MAX UUIDs.\n\n## Bytes\n\n```ts\nimport { parse, stringify, NIL, MAX } from \"@billdaddy/uuidkit\";\n\nparse(\"00000000-0000-0000-0000-000000000000\"); // Uint8Array(16)\nstringify(bytes);                               // canonical 8-4-4-4-12 string\nNIL; // \"00000000-0000-0000-0000-000000000000\"\nMAX; // \"ffffffff-ffff-ffff-ffff-ffffffffffff\"\n```\n\n## Pairs well with\n\n| Need | Use |\n| --- | --- |\n| Shorter random / sortable ids (nanoid, ULID) | [`@billdaddy/idkit`](https://www.npmjs.com/package/@billdaddy/idkit) |\n| Base64URL-encode a UUID's bytes | [`codeckit`](https://www.npmjs.com/package/codeckit) |\n\n## Contributors ✨\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome — code, docs, bug reports, ideas, reviews! See the [emoji key](https://allcontributors.org/docs/en/emoji-key) for how each contribution is recognized, and open a PR or issue to get involved.\n\nThanks goes to these wonderful people:\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/trananhtung\"><img src=\"https://avatars.githubusercontent.com/u/30992229?v=4?s=100\" width=\"100px;\" alt=\"Tung Tran\"/><br /><sub><b>Tung Tran</b></sub></a><br /><a href=\"https://github.com/trananhtung/uuidkit/commits?author=trananhtung\" title=\"Code\">💻</a> <a href=\"#maintenance-trananhtung\" title=\"Maintenance\">🚧</a></td>\n    </tr>\n  </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## License\n\n[MIT](./LICENSE) © Tung Tran\n","readmeFilename":"README.md"}