Skip to content

Instantly share code, notes, and snippets.

@ColinFendrick
Created March 6, 2018 15:13
Show Gist options
  • Save ColinFendrick/496bae15ff15e7ac1ff7c5a66bd122e0 to your computer and use it in GitHub Desktop.
Save ColinFendrick/496bae15ff15e7ac1ff7c5a66bd122e0 to your computer and use it in GitHub Desktop.
const unhash = num => {
let charpos = []
let word = []
let dictionary = 'acdfgilmnoprstuw'
for (i = 10; i > 0; i--) {
charpos[i] = (num % 23)
num = (num - charpos[i]) / 23
word[i - 1] = dictionary.charAt(charpos[i])
}
return word.join('')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment