Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
extraneous = Object.keys(dep.dependencies || {}).length === 0;
}
if (options.shrinkwrap && dep.shrinkwrap) {
shrinkwrap = Object.keys(dep.dependencies || {}).length === 0;
}
if (!match) {
return !(bundled && extraneous && shrinkwrap);
}
if (dep.name === match.name) {
if (semver.satisfies(dep.version, match.version)) {
// if we're not colouring, then we'll highlight match
if (!options.count) {
dep.full = colour.bgGreen(colour.black(dep.full));
}
// false if it has all the requirements
return !(
(bundled || options.bundled && dep.bundled) &&
(extraneous || options.extraneous && dep.extraneous) &&
(shrinkwrap || options.shrinkwrap && dep.shrinkwrap) &&
true);
}
return true; // prune
}
return true;
});
}