@pnpm/check-package
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.1
    2
    • latest
  • 3.0.1
    2
    • next

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.1
    2
  • 3.0.0
    0
  • 2.0.0
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i @pnpm/check-package

Weekly Downloads

5

Version

3.0.1

License

MIT

Unpacked Size

5.03 kB

Total Files

6

Last publish

Collaborators

  • pnpmuser
  • zkochan