How to use the minimatch.bind function in minimatch

To help you get started, we’ve selected a few minimatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thedeeno / web-component-tester-istanbul / lib / middleware.js View on Github external
function match(str, rules) {
    return _.any(rules, minimatch.bind(null, str));
}
github SC5 / sc5-styleguide / test / unit / modules / vinyl-helper.js View on Github external
function match(path, patterns) {
  var pattern = _.isArray(patterns) ? patterns : [patterns],
      matches = minimatch.bind(null, path);
  return _.any(pattern, matches);
}
github nfl / react-wildcat / packages / react-wildcat / src / utils / createTranspiledModule.js View on Github external
if (logLevel > 1) {
                        logger.meta(logCreateSuccess(relativePath));
                    }
                })
                .on("error", function outputStreamError(outputErr) {
                    logger.error(outputErr);
                })
                .end(JSON.stringify(data.map));
        }

        let instrumentedCodePromise;

        if (
            coverage &&
            instrumenter &&
            !instrumentationExcludes.some(minimatch.bind(null, relativePath))
        ) {
            instrumentedCodePromise = new Promise(
                function instrumenterPromise(resolveInstrumenter, rejectInstrumenter) {
                    instrumenter.instrument(
                        data.code,
                        relativePath,
                        function instrumentOutput(instrumentError, instrumentedCode) {
                            if (instrumentError) {
                                return rejectInstrumenter(instrumentError);
                            }

                            return resolveInstrumenter(instrumentedCode);
                        }
                    );
                }
            );
github hillmanov / gulp-manifest / index.js View on Github external
function shouldExcludeFile(filePath) {
    return exclude.some(minimatch.bind(null, filePath));
  }