You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michael Winter 555e2c196e | 6 years ago | |
---|---|---|
.. | ||
index.js | 6 years ago | |
license | 6 years ago | |
package.json | 6 years ago | |
readme.md | 6 years ago |
readme.md
buffer-equals
Node.js
buffer.equals()
ponyfill
Install
$ npm install --save buffer-equals
Usage
const bufferEquals = require('buffer-equals');
bufferEquals(new Buffer('foo'), new Buffer('foo'));
//=> true
bufferEquals(new Buffer('foo'), new Buffer('bar'));
//=> false
API
See the buffer.equals()
docs.
The only difference is that you pass in the buffer as the first argument instead of calling the .equals()
method on the buffer instance.
Related
- buf-compare - Node.js 0.12
Buffer.compare()
ponyfill - buf-indexof - Node.js 4.0
buffer.indexOf()
ponyfill
License
MIT © Sindre Sorhus