validate-npm-package

Validate a package.json file

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
validate-npm-package
3891.0.57 years ago7 years agoMinified + gzip package size for validate-npm-package in KB

Readme

validate-npm-package
Validate a package.json file

const validateNpmPackage = require('validate-npm-package');

let results = validateNpmPackage({
  name: 'foo',
  version: '1.0.0',
});
// {
//   validForNewPackages: false,
//   validForOldPackages: true,
//   warnings: ["..."],
//   errors: ["..."],
// }

There's also a CLI:
$ validate-npm-package
$ validate-npm-package path/to/pkg
$ validate-npm-package --quiet/-q