prc b6c02717e6 Upload complete no-internet building environment. | il y a 1 an | |
---|---|---|
.. | ||
.github | il y a 1 an | |
example | il y a 1 an | |
test | il y a 1 an | |
.eslintrc | il y a 1 an | |
CHANGELOG.md | il y a 1 an | |
LICENSE | il y a 1 an | |
README.md | il y a 1 an | |
index.js | il y a 1 an | |
package.json | il y a 1 an |
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