MCPcopy
hub / github.com/webpack/webpack / find

Function find

lib/util/SetHelpers.js:61–65  ·  view source on GitHub ↗
(set, fn)

Source from the content-addressed store, hash-verified

59 * @returns {T | undefined} found item
60 */
61const find = (set, fn) => {
62 for (const item of set) {
63 if (fn(item)) return item;
64 }
65};
66
67/**
68 * Returns first item.

Callers 3

applyMethod · 0.50
applyMethod · 0.50
applyMethod · 0.50

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected