Created
March 5, 2018 16:10
-
-
Save frkosk/1d2862f7bbf13366fd051ecd51a35f5a to your computer and use it in GitHub Desktop.
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
| function getID () { | |
| // Math.random should be unique because of its seeding algorithm. | |
| // Convert it to base 36 (numbers + letters), and grab the first 9 characters | |
| // after the decimal. | |
| return '_' + Math.random().toString(36).substr(2, 9); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment