Generate prefixed, k-sorted globally unique identifiers. You can read more about them in our blog post.
$ yarn add @cuvva/ksuidconstksuid=require('@cuvva/ksuid');constid=ksuid.generate('user').toString();// user_000000BgNwexbyo1VZs78wVMGdBo3try{constparsed=ksuid.parse('user_000000BgNwexbyo1VZs78wVMGdBo3');}catch(error){console.log('uh oh!');}Install the development dependencies first:
$ yarnThen run the tests 👩🔬:
$ yarn testPlease open an issue on this repository.
MIT licensed - see LICENSE file