Skip to content

Repository files navigation

ksuid

Generate prefixed, k-sorted globally unique identifiers. You can read more about them in our blog post.

NPM VersionBuild StatusCoverage Status

Installation

$ yarn add @cuvva/ksuid

Usage

constksuid=require('@cuvva/ksuid');constid=ksuid.generate('user').toString();// user_000000BgNwexbyo1VZs78wVMGdBo3try{constparsed=ksuid.parse('user_000000BgNwexbyo1VZs78wVMGdBo3');}catch(error){console.log('uh oh!');}

Testing

Install the development dependencies first:

$ yarn

Then run the tests 👩‍🔬:

$ yarn test

Support

Please open an issue on this repository.

License

MIT licensed - see LICENSE file

About

Generate prefixed, k-sorted globally unique identifiers... In node!

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages