Home > other >  Generating a UUID by limiting the characters' length
Generating a UUID by limiting the characters' length

Time:10-30

I am using the node js library uuid-int to generate unique id.

const id = 0;
const generator = UUID(id);
const uuid = generator.uuid(); // e.g. 3425779734788360

However I want to reduce the length of the number while making sure it is still unique.

Any idea ?

CodePudding user response:

Just use another library e.g. https://shortunique.id

  • Related