UNPKG

debt-collector

Version:

a nodejs tool to identify, track and mesure technical debt

11 lines (10 loc) 296 B
import { countAll } from './countAll.js'; export const findOneOf = (data) => (matches) => { let count = 0; let index = 0; while (count === 0 && index <= matches.length - 1) { count = countAll(data)(matches[index]); index += 1; } return count === 0 ? 0 : 1; };