MCPcopy Index your code
hub / github.com/nodejs/node / resolve

Function resolve

test/module-hooks/test-module-hooks-resolve-require-resolve-paths.js:16–21  ·  view source on GitHub ↗
(specifier, context, nextResolve)

Source from the content-addressed store, hash-verified

14
15const hook = registerHooks({
16 resolve(specifier, context, nextResolve) {
17 if (specifier === 'bar') {
18 resolveCallCount.push(specifier);
19 }
20 return nextResolve(specifier, context);
21 },
22});
23
24// require.resolve with paths option should go through hooks and resolve correctly.

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…