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

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

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

4 Versions

  • 1.0.0                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 620
This Week 620
This Month 620
Last Day 891
Last Week 18,650
Last Month 72,142
Dependencies (0)
None
Dev Dependencies (1)
Dependents (134)

Copyright 2014 - 2016 © taobao.org |