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

Function matchGlobPattern

lib/internal/fs/glob.js:932–945  ·  view source on GitHub ↗

* Check if a path matches a glob pattern * @param {string} path the path to check * @param {string} pattern the glob pattern to match * @param {boolean} windows whether the path is on a Windows system, defaults to `isWindows` * @returns {boolean}

(path, pattern, windows = isWindows)

Source from the content-addressed store, hash-verified

930 * @returns {boolean}
931 */
932function matchGlobPattern(path, pattern, windows = isWindows) {
933 validateString(path, 'path');
934 validateString(pattern, 'pattern');
935 return lazyMinimatch().minimatch(path, pattern, {
936 kEmptyObject,
937 nocase: isMacOS || isWindows,
938 windowsPathsNoEscape: true,
939 nonegate: true,
940 nocomment: true,
941 optimizationLevel: 2,
942 platform: windows ? 'win32' : 'posix',
943 nocaseMagicOnly: true,
944 });
945}
946
947module.exports = {
948 __proto__: null,

Callers

nothing calls this directly

Calls 1

lazyMinimatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…