MCPcopy
hub / github.com/webpack/webpack / isSubset

Function isSubset

lib/util/SetHelpers.js:46–52  ·  view source on GitHub ↗
(bigSet, smallSet)

Source from the content-addressed store, hash-verified

44 * @returns {boolean} returns true if smallSet contains all elements inside of the bigSet
45 */
46const isSubset = (bigSet, smallSet) => {
47 if (bigSet.size < smallSet.size) return false;
48 for (const item of smallSet) {
49 if (!bigSet.has(item)) return false;
50 }
51 return true;
52};
53
54/**
55 * Returns found item.

Callers 4

needBuildMethod · 0.85
applyMethod · 0.85
createGetCombinationsMethod · 0.85
StartupHelpers.jsFile · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected