Skip to content

Instantly share code, notes, and snippets.

@bittu
Created November 6, 2019 17:33
Show Gist options
  • Save bittu/9c26f1361d718d9c4c5503cf86154b99 to your computer and use it in GitHub Desktop.
Save bittu/9c26f1361d718d9c4c5503cf86154b99 to your computer and use it in GitHub Desktop.
Simple javascript unique Id generator
const uniqId = () => (Date.now() * Math.random()).toString(36)
// Generates uniqId as
// coyppu5a.lan
// b3v7gp76.lif
// If '.' wants to be removed remove then use replace or Math.ceil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment