md5-file
Simply return an md5
sum of a given file.
Installation
$ npm install md5-file
Test:
$ npm test
API
Sync:
md5File(path)
var md5File = require('md5-file');
md5File('path/to/a_file');
Async:
md5File(path, callback, [strict])
If strict is true
and there is an error it will throw
it, otherwise it will pass an error string through the callback.
md5File.async('./README.md', function (data) {
console.log(data);
});
md5File.async('./README.md', function (data) {
console.log(data);
}, true);
md5File.async('./null', function (data) {
console.log(data);
});
md5File.async('./null', function (data) {
console.log(data);
}, true);
License
MIT