wishthis/node_modules/buffer-equal
2022-11-30 13:56:09 +01:00
..
.github Update dependencies 2022-11-30 13:56:09 +01:00
example Update dependencies 2022-11-30 13:56:09 +01:00
test Update dependencies 2022-11-30 13:56:09 +01:00
.eslintrc Update dependencies 2022-11-30 13:56:09 +01:00
CHANGELOG.md Update dependencies 2022-11-30 13:56:09 +01:00
index.js Update dependencies 2022-11-30 13:56:09 +01:00
LICENSE Add production dependencies 2022-01-21 09:28:41 +01:00
package.json Update dependencies 2022-11-30 13:56:09 +01:00
README.md Update dependencies 2022-11-30 13:56:09 +01:00

buffer-equal Version Badge

github actions coverage License Downloads

npm badge

Return whether two buffers are equal.

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