陈鹏铭 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
..
.github 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
example 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
test 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
.eslintrc 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
CHANGELOG.md 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
LICENSE 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
README.md 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
index.js 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an
package.json 25c6cf8178 苏南产业园 管理端 第一次提交 il y a 1 an

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