陈鹏铭 93064e9f91 首次提交 пре 11 месеци
..
.github 93064e9f91 首次提交 пре 11 месеци
example 93064e9f91 首次提交 пре 11 месеци
test 93064e9f91 首次提交 пре 11 месеци
.eslintrc 93064e9f91 首次提交 пре 11 месеци
CHANGELOG.md 93064e9f91 首次提交 пре 11 месеци
LICENSE 93064e9f91 首次提交 пре 11 месеци
README.md 93064e9f91 首次提交 пре 11 месеци
index.js 93064e9f91 首次提交 пре 11 месеци
package.json 93064e9f91 首次提交 пре 11 месеци

README.md

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