buffer-equal
return whether two buffers are equal
Last updated 2 years ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install buffer-equal 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

5 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.2                                ...           9 years ago
  • 0.0.1                                ...           11 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (2)
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)

© 2010 - cnpmjs.org x YWFE | Home | YWFE