doc/node_modules/buffer-equal
2021-05-05 15:50:12 +02:00
..
example Move content to repo root 2021-05-05 15:50:12 +02:00
test Move content to repo root 2021-05-05 15:50:12 +02:00
.travis.yml Move content to repo root 2021-05-05 15:50:12 +02:00
index.js Move content to repo root 2021-05-05 15:50:12 +02:00
LICENSE Move content to repo root 2021-05-05 15:50:12 +02:00
package.json Move content to repo root 2021-05-05 15:50:12 +02:00
README.markdown Move content to repo root 2021-05-05 15:50:12 +02:00

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