typid
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

typid

Simple Stripe like IDs, non sortable. Defaults to 80 bits of randomness[^1] (12-14 characters).

import typid from "typid";
const id = typid("user");
// => user_5ozBxXrc2vRXiQ
const privateKey = typid("pk", 128);

[^1] On average, it takes around 22 trillion generated IDs to get a duplicate.

Readme

Keywords

none

Package Sidebar

Install

npm i typid

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

16.2 kB

Total Files

18

Last publish

Collaborators

  • olalonde