A simple (CLI) tool to compare two files
Filessert uses Node.js’s crypto
library for hash comparison, so make sure you’re using a Node.js build that includes support for the crypto
module.
npm install --save-dev filessert
const filessert = require('filessert');
filessert(file1, file2).then(() => {
console.log('Yay!');
}).catch(() => {
console.log('Oh no!');
});
npm install -g filessert
$ filessert test1.txt test1.txt
Specifies the hash algorithm to be used for comparison (see Node.js’s
crypto
library)
const filessert = require('filessert');
filessert(file1, file2, {
algorithm: 'whirlpool'
}).then(() => {
console.log('Yay!');
}).catch(() => {
console.log('Oh no!');
});
$ filessert test1.txt test1.txt --algorithm=whirlpool
- 0.0.1
- Initial version
Copyright (c) 2017 Thomas Rasshofer
Licensed under the MIT license.
See LICENSE for more info.