awdirectoryhash
v1.0.4
Published
Builds a hash-tree for a directory.
Downloads
1
Readme
awDirectoryHash
A NPM package that recursively reads a directory and creates a tree of file hashes.
Installing
To install run:
npm install awdirectoryhash
Usage
Import the entry method:
import { getInstance } from 'awdirectoryhash';
interface Hasher {
hashDirectory (directoryPath: string): string;
}
const hashConfig = {
hashAlgorithm: 'sha256',
hashEncoding: 'hex'
};
const hasher = getInstance(hashConfig);
const hash = hasher.hashDirectory(directoryPath);
Running the tests
Run
npm test
Versioning
We use SemVer for versioning.
Authors
- Martin Hula - Initial work - anakreon
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details