Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用节点 js 库uuid-int来生成唯一 ID。
uuid-int
const id = 0; const generator = UUID(id); const uuid = generator.uuid(); // e.g. 3425779734788360
但是我想减少数字的长度,同时确保它仍然是唯一的。
任何想法 ?
只需使用另一个库,例如https://shortunique.id