@nacho-cs/quuid
v1.0.1
Published
A tiny library for generating secure ids
Downloads
2
Readme
quuid
(or Quick Unique Url IDs)
A tiny library for generating secure ids
You can generate:
- rfc4122 v1-compliant UUIDs
- rfc4122 v4-compliant UUIDs
- Cryptographically secure, url-safe, ids of any byte length
- Short rfc4122 v4-compliant UUIds
Installation:
Run:
$ npm i quuid
For ES6:
import uuid from "quuid";
Usage:
Just use the constructor uuid
and add whatever id you want after
import uuid from "quuid";
console.log(new uuid().v1()); // returns v1 uuids
console.log(new uuid().v4()); // returns v4 uuids
console.log(new uuid().id(8)); // returns an 8 byte id in base 36
console.log(new uuid().short()); // returns short v4 uuids