node.jsuuidnode-uuid

Generating a UUID by limiting the characters' length


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 ?


Solution

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