java script hash
function hashFnv32a(str, asString, seed) {
/*jshint bitwise:false */
var i, l,
hval = (seed === undefined) ? 0x811c9dc5 : seed;
for (i = 0, l = str.length; i < l; i++) {
hval ^= str.charCodeAt(i);
hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
}
if( asString ){
// Convert to 8 digit hex string
return ("0000000" + (hval >>> 0).toString(16)).substr(-8);
}
return hval >>> 0;
}
Also in JavaScript:
- react router external link
- settimeout in loop javascript
- JavaScript append HTML
- javascript check if string contains a text substring
- how to check if item is in list js
- mysql remove quote on json extract
- js ternary if else
- javascript add div to body with class
- label tag alternative in react native
- js set visibility on timeout
- javascriopt initialize 2d array with size
- nodejs get file size
- javascript if has jquery loaded
- angular how to use service in class
- uppercase in word javascript
- uppercase string in js
- filter geojson programmatically
- js json_encode pretty
- js trim out input white space
- href before onclick js
- ng has unexpectedly closed (exit code 127).
- adonis lucid join
- allow cross origin node
- js ask before close chrome