MCPcopy
hub / github.com/webpack/webpack / includesHash

Function includesHash

lib/Compiler.js:165–171  ·  view source on GitHub ↗
(filename, hashes)

Source from the content-addressed store, hash-verified

163 * @returns {boolean} true, if the filename contains any hash
164 */
165const includesHash = (filename, hashes) => {
166 if (!hashes) return false;
167 if (Array.isArray(hashes)) {
168 return hashes.some((hash) => filename.includes(hash));
169 }
170 return filename.includes(hashes);
171};
172
173const getValidate = memoize(() => require("schema-utils").validate);
174

Callers 1

emitFilesMethod · 0.85

Calls 1

isArrayMethod · 0.80

Tested by

no test coverage detected