Created
April 23, 2018 06:44
-
-
Save mishalrai/c0a6c14cc71b7df42335e834f73ffdcf to your computer and use it in GitHub Desktop.
This file contains 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
export const getRandomId = () => { | |
let random = function () { | |
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); | |
}; | |
return (random() + random() + "-" + random() + "-" + random() + "-" + random() + "-" + random() + random() + random()); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment