@pnpm/check-package
Checks the integrity of a package
Last updated 9 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @pnpm/check-package 
SYNC missed versions from official npm registry.

@pnpm/check-package

Checks the integrity of a package

npm version Build Status

When pnpm saves a package to the store, it creates an integrity.json file. integrity.json contains a hash for each file of the package. @pnpm/check-package can check whether the resources of the package were modified, using integrity.json.

Install

Install it via npm.

npm install @pnpm/npm-resolver

Usage

'use strict'
const checkPackage = require('@pnpm/check-package').default

checkPackage('test/fixtures/good/pkg')
  .then(ok => {
    console.log(Boolean(ok))
    //> true
  })
  .catch(err => console.error(err))

API

checkPackage(packagePath) => Promise<matchedIntegrity | false>

If the package has been touched, false is returned. If the package has its "canonical" form, the content of integrity.json is returned.

License

MIT © Zoltan Kochan

Current Tags

  • 3.0.1                                ...           latest (8 years ago)
  • 3.0.1                                ...           next (8 years ago)

4 Versions

  • 3.0.1                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 10
Today 0
This Week 1
This Month 9
Last Day 0
Last Week 5
Last Month 0
Dependencies (3)
Dev Dependencies (10)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE