1.0.0 • Published 8 years ago
ac-rev-hash v1.0.0
ac-rev-hash
Create a hash for file revving
It will create a md5
hash from the input buffer and slice it to 20 characters,
which is unique enough for this purpose.
Install
$ npm install --save ac-rev-hash
Usage
var fs = require('fs');
var revHash = require('ac-rev-hash');
var buffer = fs.readFileSync('unicorn.png');
revHash(buffer);
//=> 'bb9d8fe615bb9d8fe615'
License
MIT © Sindre Sorhus
1.0.0
8 years ago