Deno: Standard Modules: ID generators

Created on 29 Nov 2019  路  5Comments  路  Source: denoland/deno

JavaScript community has a few of popular id generators like the following (other than uuid):

How about including these to the standard modules?

Most helpful comment

I'm supportive of moving std/uuid to std/idgen/uuid.ts and potentially adding other ID generators. Not so sure which other ones to include though, since adding a new module is basically adding extra maintenance cost. (I would expect as Deno matures each different std module would have a list of maintainer volunteers)

(I kind of also envisioning a module election process to std at some point in the future)

All 5 comments

I'm supportive of moving std/uuid to std/idgen/uuid.ts and potentially adding other ID generators. Not so sure which other ones to include though, since adding a new module is basically adding extra maintenance cost. (I would expect as Deno matures each different std module would have a list of maintainer volunteers)

(I kind of also envisioning a module election process to std at some point in the future)

Note: npmtrends link https://www.npmtrends.com/shortid-vs-nanoid-vs-ulid-vs-uuid-vs-uniqid-vs-cuid

uuid seems by far the most popular one. nanoid and shortid come next in regard with the download count. ulid and cuid are less downloaded, but these 2 are ported to many different languages and ulid seems having nice spec.

@kevinkassimo

Should we open an issue and pin it for looking long-term maintenance volunteers for specific modules.

The cuid may be with less downloads but is pretty great, stable and robust. First time hearing about shortid.

Definitely uuid, cuid and nanoid.

@axetroy Might be a good idea, although I doubt a concrete list could be established before 1.0 release

Was this page helpful?
0 / 5 - 0 ratings