Skip to content

Instantly share code, notes, and snippets.

@rasolofonirina
Created March 23, 2022 14:04
Show Gist options
  • Save rasolofonirina/7cc5319c979130cd68af1b14c474fe2f to your computer and use it in GitHub Desktop.
Save rasolofonirina/7cc5319c979130cd68af1b14c474fe2f to your computer and use it in GitHub Desktop.
Generate Unique ID
function uid() {
const head = Date.now().toString(36)
const tail = Math.random().toString(36).substring(2)
return head + tail
}
uid()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment