Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

file-compare

willmark5470.0.2

Compare two file hashes and callback result

hash, compare, file comparison

readme

file-compare

Stability - 2 Unstable

Compare two files hash values

API

compare(file1, file2, [algorithm], function(result))

Compares file1 hash to file2 hash and callback function gets a boolean result 'true' on a match
 * usage: compare(file1, file2, [algo], callback);
 * where:
 *    file1 - required string path to file 1
 *    file2 - required string path to file 2
 *    algo - option string algorithm for hash computation
 *    callback - required callaback(copied, err)
 *    where: 
 *       copied - boolean indicating if compare succeeded
 *       err - Error if there was a problem with the compare
Optional [algorithm] is a string indicator of the type of hash to use (ie. 'sha1', 'md5', etc.)