You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rdrew
573c318665
|
2 years ago | |
---|---|---|
.. | ||
.github | 2 years ago | |
example | 2 years ago | |
test | 2 years ago | |
.eslintrc | 2 years ago | |
CHANGELOG.md | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
index.js | 2 years ago | |
package.json | 2 years ago |
README.md
buffer-equal
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