Created
March 11, 2022 10:19
-
-
Save AitorAlejandro/93e79d93def5f2bd6f6c07e12cf6468e to your computer and use it in GitHub Desktop.
Generate a random number string based on the current time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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