sensordb2 e64a8defe5 3.17 | 1 rok pred | |
---|---|---|
.. | ||
example | 1 rok pred | |
test | 1 rok pred | |
.travis.yml | 1 rok pred | |
LICENSE | 1 rok pred | |
README.markdown | 1 rok pred | |
index.js | 1 rok pred | |
package.json | 1 rok pred |
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