* Buffer froms that should be allocs

* Remove unnecessary Buffer fill after alloc
*  minor cleanup on fnv1a.js
This commit is contained in:
David Stephens 2018-04-28 21:39:04 +01:00
parent 0d7676a871
commit b45a6a8743
3 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ module.exports = class FNV1a {
digest(encoding) {
encoding = encoding || 'binary';
let buf = Buffer.alloc(4);
const buf = Buffer.alloc(4);
buf.writeInt32BE(this.hash & 0xffffffff, 0);
return buf.toString(encoding);
}