MCPcopy
hub / github.com/webpack/webpack / hashFilename

Function hashFilename

lib/optimize/SplitChunksPlugin.js:205–214  ·  view source on GitHub ↗
(name, outputOptions)

Source from the content-addressed store, hash-verified

203 * @returns {string} hashed filename
204 */
205const hashFilename = (name, outputOptions) => {
206 const digest =
207 /** @type {string} */
208 (
209 createHash(outputOptions.hashFunction)
210 .update(name)
211 .digest(outputOptions.hashDigest)
212 );
213 return digest.slice(0, 8);
214};
215
216/**
217 * Returns the number of requests.

Callers 2

getKeyMethod · 0.85
applyMethod · 0.85

Calls 4

createHashFunction · 0.85
sliceMethod · 0.80
digestMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected