Skip to content

Instantly share code, notes, and snippets.

@louy2 louy2/hash.js
Last active Feb 13, 2019

Embed
What would you like to do?
Simple one-line hash (don't use for anything serious)
let hash = k => Array.from(k).map(s => s.charCodeAt(0)).reduce((a, c) => a + c, 0) % 111 + 1
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.