MCPcopy
hub / github.com/webpack/webpack / hashForName

Function hashForName

lib/serialization/FileMiddleware.js:56–60  ·  view source on GitHub ↗
(buffers, hashFunction)

Source from the content-addressed store, hash-verified

54 * @returns {string} hash
55 */
56const hashForName = (buffers, hashFunction) => {
57 const hash = createHash(hashFunction);
58 for (const buf of buffers) hash.update(buf);
59 return hash.digest("hex");
60};
61
62const COMPRESSION_CHUNK_SIZE = 100 * 1024 * 1024;
63const DECOMPRESSION_CHUNK_SIZE = 100 * 1024 * 1024;

Callers 1

serializeFunction · 0.85

Calls 3

createHashFunction · 0.85
updateMethod · 0.45
digestMethod · 0.45

Tested by

no test coverage detected