Last active
August 16, 2019 04:11
-
-
Save js2me/c1fceed3c7c9dd30a919a8551aca20c4 to your computer and use it in GitHub Desktop.
Random max safe integer number
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
export function uuid(a) { | |
return a ? (a ^ Math.random() * 16 >> a / 4).toString(16) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, uuid); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment