Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
return whether two buffers are equal
branch: master

0.0.1

latest commit 7d08354dac
James Halliday authored
Failed to load latest commit information.
example working implementation
test readme test and example
.travis.yml update node versions on travis
README.markdown fix require()
index.js Use node 0.11+ buffer.equals when available
package.json 0.0.1

README.markdown

buffer-equal

Return whether two buffers are equal.

build status

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

Something went wrong with that request. Please try again.