Skip to content

Instantly share code, notes, and snippets.

@contra contra/gist:2141373
Created Mar 20, 2012

What would you like to do?
makeUUID = ->
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace /[xy]/g, (a, b) ->
b = Math.random() * 16
return (if a is "y" then b & 3 | 8 else b | 0).toString 16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.