thedesk/app/node_modules/buffer-equal
2018-05-26 21:48:13 +09:00
..
example TheDesk Riina (ver.3) 2018-02-19 02:41:25 +09:00
test TheDesk Riina (ver.3) 2018-02-19 02:41:25 +09:00
.travis.yml TheDesk Riina (ver.3) 2018-02-19 02:41:25 +09:00
index.js TheDesk Riina (ver.3) 2018-02-19 02:41:25 +09:00
package.json TheDesk Mio (ver.5) 2018-05-26 21:48:13 +09:00
README.markdown TheDesk Riina (ver.3) 2018-02-19 02:41:25 +09:00

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