| .. | |||
| .github | 4 months ago | ||
| example | 4 months ago | ||
| test | 4 months ago | ||
| .eslintrc | 4 months ago | ||
| CHANGELOG.md | 4 months ago | ||
| LICENSE | 4 months ago | ||
| README.md | 4 months ago | ||
| index.js | 4 months ago | ||
| package.json | 4 months ago | ||
Return whether two buffers are equal.
var bufferEqual = require('buffer-equal');
console.dir(bufferEqual(
new Buffer([253,254,255]),
new Buffer([253,254,255])
));
console.dir(bufferEqual(
new Buffer('abc'),
new Buffer('abcd')
));
console.dir(bufferEqual(
new Buffer('abc'),
'abc'
));
output:
true false undefined
var bufferEqual = require('buffer-equal');
Return whether the two buffers a and b are equal.
If a or b is not a buffer, return undefined.
With npm do:
npm install buffer-equal
MIT