How to use the lockfile-lint-api.ValidateHttps function in lockfile-lint-api

To help you get started, we’ve selected a few lockfile-lint-api 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 lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateHttpsManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-host-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateHttps({packages: lockfile.object})

  return validator.validate()
}

lockfile-lint-api

Lint an npm or yarn lockfile to analyze and detect issues

Apache-2.0
Latest version published 3 months ago

Package Health Score

85 / 100
Full package analysis