MCPcopy
hub / github.com/webpack/webpack / someInIterable

Function someInIterable

lib/util/IterableHelpers.js:28–33  ·  view source on GitHub ↗
(iterable, filter)

Source from the content-addressed store, hash-verified

26 * @returns {boolean} true, if some items match the filter predicate
27 */
28const someInIterable = (iterable, filter) => {
29 for (const item of iterable) {
30 if (filter(item)) return true;
31 }
32 return false;
33};
34
35/**
36 * Returns count of items.

Callers 2

applyMethod · 0.85
renderBootstrapMethod · 0.85

Calls 1

filterFunction · 0.50

Tested by

no test coverage detected