Skip to content

Instantly share code, notes, and snippets.

@rinsuki
Created July 22, 2021 22:56
Show Gist options
  • Save rinsuki/79f975562748075ea461959a52434a35 to your computer and use it in GitHub Desktop.
Save rinsuki/79f975562748075ea461959a52434a35 to your computer and use it in GitHub Desktop.
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
export function generateActionTrackID() {
let id = ""
for (let i=0; i<10; i++) {
id += chars[Math.floor(chars.length * Math.random())]
}
id += "_" + Date.now()
return id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment