Skip to content

Instantly share code, notes, and snippets.

@schas002
Created October 4, 2017 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schas002/5f722bcb2e9a2e866586de6dfe7acfdf to your computer and use it in GitHub Desktop.
Save schas002/5f722bcb2e9a2e866586de6dfe7acfdf to your computer and use it in GitHub Desktop.
Humble one-liner to generate UIDs in vanilla.
module.exports = _ => new Date().getTime().toString(36) + '.' + (Math.random() * Math.pow(2, 32)).toString(36);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment