How to use the ansicolors.bgGreen function in ansicolors

To help you get started, we’ve selected a few ansicolors 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 snyk / resolve-deps / cli / filter.js View on Github external
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;
  });
}