Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function match(str, rules) {
return _.any(rules, minimatch.bind(null, str));
}
function match(path, patterns) {
var pattern = _.isArray(patterns) ? patterns : [patterns],
matches = minimatch.bind(null, path);
return _.any(pattern, matches);
}
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);
}
);
}
);
function shouldExcludeFile(filePath) {
return exclude.some(minimatch.bind(null, filePath));
}