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



``bash`
$ yarn add @cuvva/ksuid
`js
const ksuid = require('@cuvva/ksuid');
const id = ksuid.generate('user').toString();
// user_000000BgNwexbyo1VZs78wVMGdBo3
try {
const parsed = ksuid.parse('user_000000BgNwexbyo1VZs78wVMGdBo3');
} catch (error) {
console.log('uh oh!');
}
`
Install the development dependencies first:
`bash`
$ yarn
Then run the tests 👩🔬:
`bash``
$ yarn test
Please open an issue on this repository.
MIT licensed - see LICENSE file