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