Skip to content

Instantly share code, notes, and snippets.

@pushandplay
Last active December 22, 2015 17:49
Show Gist options
  • Save pushandplay/6508539 to your computer and use it in GitHub Desktop.
Save pushandplay/6508539 to your computer and use it in GitHub Desktop.
String::hash = ->
userNumber = @length
for i in @
char = @charCodeAt i
userNumber += char
(userNumber + Math.floor(userNumber * 1e15)).toString(32).toUpperCase()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment