UNPKG

eslint-plugin-exception-handling

Version:

💣 Lints unhandled functions that might throw errors. For JavaScript/TypeScript eslint.

11 lines (10 loc) • 275 B
import { exploreChildren } from "./explore-children.js"; export function findInChildrenAll(node, predicate) { const result = []; exploreChildren(node, (child) => { if (predicate(child)) { result.push(child); } }); return result; }