MCPcopy
hub / github.com/webpack/webpack / countIterable

Function countIterable

lib/util/IterableHelpers.js:41–45  ·  view source on GitHub ↗
(iterable)

Source from the content-addressed store, hash-verified

39 * @returns {number} count of items
40 */
41const countIterable = (iterable) => {
42 let i = 0;
43 for (const _ of iterable) i++;
44 return i;
45};
46
47module.exports.countIterable = countIterable;
48module.exports.last = last;

Calls

no outgoing calls

Tested by

no test coverage detected