node/tools/eslint/node_modules/micromark/lib/util/resolve-all.mjs
Michaël Zasso 2eff28fb7a
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-19 19:54:08 +00:00

19 lines
358 B
JavaScript

export default resolveAll
function resolveAll(constructs, events, context) {
var called = []
var index = -1
var resolve
while (++index < constructs.length) {
resolve = constructs[index].resolveAll
if (resolve && called.indexOf(resolve) < 0) {
events = resolve(events, context)
called.push(resolve)
}
}
return events
}