Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Assume no side effects until we find out otherwise.
var result = false;
function check(child) {
if (result) {
// Do nothing.
} else if (isArray.check(child)) {
child.some(check);
} else if (n.Node.check(child)) {
assert.strictEqual(result, false);
result = predicate(child);
}
return result;
}
types.eachField(node, function(name, child) {
check(child);
});
return result;
}