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

Function glob

lib/fs.js:3786–3799  ·  view source on GitHub ↗
(pattern, options, callback)

Source from the content-addressed store, hash-verified

3784const lazyGlob = getLazy(() => require('internal/fs/glob').Glob);
3785
3786function glob(pattern, options, callback) {
3787 if (typeof options === 'function') {
3788 callback = options;
3789 options = undefined;
3790 }
3791 callback = makeCallback(callback);
3792
3793 const Glob = lazyGlob();
3794 PromisePrototypeThen(
3795 ArrayFromAsync(new Glob(pattern, options).glob()),
3796 (res) => callback(null, res),
3797 callback,
3798 );
3799}
3800
3801function globSync(pattern, options) {
3802 const Glob = lazyGlob();

Callers 5

callbackFunction · 0.50
completionMethod · 0.50
execMethod · 0.50
execMethod · 0.50

Calls 3

globMethod · 0.80
makeCallbackFunction · 0.70
callbackFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…