Skip to content

Instantly share code, notes, and snippets.

@0187773933
Created December 10, 2022 15:37
Show Gist options
  • Save 0187773933/88d5d4a6f1a36db913df6cedbf25e932 to your computer and use it in GitHub Desktop.
Save 0187773933/88d5d4a6f1a36db913df6cedbf25e932 to your computer and use it in GitHub Desktop.
Javascript - Quick Hash String
function quick_hash_string( input_string ) {
// https://stackoverflow.com/a/47617289
return input_string.split('').map(v=>v.charCodeAt(0)).reduce((a,v)=>a+((a<<7)+(a<<3))^v).toString(16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment