buffer-equal
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/buffer-equal package

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i buffer-equal

Weekly Downloads

3,370,017

Version

1.0.1

License

MIT

Unpacked Size

10.5 kB

Total Files

9

Last publish

Collaborators

  • ljharb