3.0.1 • Published 7 years ago

pkg-hash v3.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

pkg-hash

Generates an MD5 hash of a CommonJS module using detective (JavaScript Acorn parser) to get a list of all the require's and hash only the local sources, starting with the "main" field in package.json.

Example

const pkgHash = require('pkg-hash');

const hash = pkgHash('/path/to/a/commonjs/module');
console.log('Hash:', hash);

Purpose

The purpose of pkg-hash is to make integrity checks between different versions/installations of an npm module.
I know that npm already gives a hash of your module when you install it, but it does not take source code into account.
Kevoree needs to be able to check whether or not a change in the source code has happen in order to update or not a module.
Well, here it is.

Related

pkg-hash-cli

3.0.1

7 years ago

3.0.0

7 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.2.0-alpha

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago