GT2/Ejectable/node_modules/buffer-equal
Ren Juan 06c1a5835d set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
..
example set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
test set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
.travis.yml set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
README.markdown set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
index.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
package.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00

README.markdown

buffer-equal

Return whether two buffers are equal.

build status

example

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

methods

var bufferEqual = require('buffer-equal')

bufferEqual(a, b)

Return whether the two buffers a and b are equal.

If a or b is not a buffer, return undefined.

install

With npm do:

npm install buffer-equal

license

MIT