Skip to content

How did you generate the IDs? #7

Answered by deliton
laurent-lao asked this question in Q&A
Discussion options

You must be logged in to vote

A simple random + Dates with Javascript.

const id = (Date.now() + Math.floor(Math.random() * 10000000)).toString(16) +
    Date.now().toString(36) +
    Math.random().toString(36).substr(2);

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@laurent-lao
Comment options

Answer selected by laurent-lao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants