ai / nanoid

A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
https://zelark.github.io/nano-id-cc/
MIT License
24.22k stars 790 forks source link

ulid format preset #449

Closed martinheidegger closed 10 months ago

martinheidegger commented 10 months ago

I am happily using nanoid for my project but (for compatibility) I also need to use ulidx, to reduce the dependencies, I was wondering if nanoid could provide a ulid preset and/or a ulid function that is compatible with ulid?

ai commented 10 months ago

No, we are not compatible. The idea of the tools is totally different. ulid is sortable ID while Nano ID is fully random.

Both ways have own benefits. You should choose told depending on task.

It is impossible to reconfigure one you another.