MCPcopy Create free account
hub / github.com/TruthHun/BookStack / hashString

Function hashString

static/webuploader/webuploader.fis.js:4312–4324  ·  view source on GitHub ↗
( str )

Source from the content-addressed store, hash-verified

4310 }
4311
4312 function hashString( str ) {
4313 var hash = 0,
4314 i = 0,
4315 len = str.length,
4316 _char;
4317
4318 for ( ; i < len; i++ ) {
4319 _char = str.charCodeAt( i );
4320 hash = _char + (hash << 6) + (hash << 16) - hash;
4321 }
4322
4323 return hash;
4324 }
4325
4326 uploader.on( 'beforeFileQueued', function( file ) {
4327 var hash = file.__hash || (file.__hash = hashString( file.name +

Callers 1

webuploader.fis.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected