MCPcopy Create free account
hub / github.com/nodejs/node / countWhere

Function countWhere

test/fixtures/snapshot/typescript.js:583–594  ·  view source on GitHub ↗
(array, predicate)

Source from the content-addressed store, hash-verified

581 }
582 ts.indexOfAnyCharCode = indexOfAnyCharCode;
583 function countWhere(array, predicate) {
584 var count = 0;
585 if (array) {
586 for (var i = 0; i < array.length; i++) {
587 var v = array[i];
588 if (predicate(v, i)) {
589 count++;
590 }
591 }
592 }
593 return count;
594 }
595 ts.countWhere = countWhere;
596 function filter(array, f) {
597 if (array) {

Callers

nothing calls this directly

Calls 1

predicateFunction · 0.50

Tested by

no test coverage detected