MCPcopy Create free account
hub / github.com/activejs/activejs / predicate

Function predicate

packages/core/src/tests/extras.spec.ts:61–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 // indexes = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14
60 const arr = [0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0];
61 const predicate = v => v === 0;
62
63 expect(findIndex(arr, predicate)).toBe(0);
64 expect(findIndex(arr, predicate, 0)).toBe(0);

Callers 7

findIndexFunction · 0.85
findIndexBackwardsFunction · 0.85
deleteIfMethod · 0.85
removeIfMethod · 0.85
deleteIfMethod · 0.85
dict-unit.spec.tsFile · 0.85
list-unit.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected