Skip to content

Instantly share code, notes, and snippets.

@odino
Created April 21, 2018 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odino/6d6b5d1f6032c12f7817eff8fd7a4db8 to your computer and use it in GitHub Desktop.
Save odino/6d6b5d1f6032c12f7817eff8fd7a4db8 to your computer and use it in GitHub Desktop.
function divide(int) {
int = Math.round(int / 2)
if (int > 10) {
return divide(int)
}
return int
}
function hash(key) {
let h = require('string-hash')(key)
return divide(h)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment