loader-utils
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -43,2 +43,3 @@ 'use strict'; | ||
let createMd4 = undefined; | ||
let BatchedHash = undefined; | ||
@@ -57,5 +58,9 @@ function getHashDigest(buffer, hashType, digestType, maxLength) { | ||
createMd4 = require('./hash/md4'); | ||
if (BatchedHash === undefined) { | ||
BatchedHash = require('./hash/BatchedHash'); | ||
} | ||
} | ||
hash = createMd4(); | ||
hash = new BatchedHash(createMd4()); | ||
} | ||
@@ -77,4 +82,3 @@ | ||
digestType === 'base58' || | ||
digestType === 'base62' || | ||
digestType === 'base64' | ||
digestType === 'base62' | ||
) { | ||
@@ -81,0 +85,0 @@ return encodeBufferToBase(hash.digest(), digestType.substr(4)).substr( |
@@ -85,3 +85,3 @@ /* | ||
// bail-out for weird chars | ||
endPos += mem.write(data.slice(endPos), endPos, encoding); | ||
endPos += mem.write(data.slice(i), endPos, encoding); | ||
break; | ||
@@ -88,0 +88,0 @@ } |
{ | ||
"name": "loader-utils", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "utils for webpack loaders", |
684
36311