Skip to content

Instantly share code, notes, and snippets.

@AitorAlejandro
Created March 11, 2022 10:19
Show Gist options
  • Save AitorAlejandro/93e79d93def5f2bd6f6c07e12cf6468e to your computer and use it in GitHub Desktop.
Save AitorAlejandro/93e79d93def5f2bd6f6c07e12cf6468e to your computer and use it in GitHub Desktop.
Generate a random number string based on the current time
const randomNumberString = (): string => new Date().getTime() + Math.random().toString(36).slice(2);
randomNumberString(); // -> 1646617484381wml196a8iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment