This package has been deprecated

Author message:

Just use `Buffer#equals()`. It has been available since Node.js 0.12.

buffer-equals

2.0.0 • Public • Published

buffer-equals Build Status

Node.js buffer.equals() ponyfill

Deprecated: Just use Buffer#equals(). It has been available since Node.js 0.12.

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

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i buffer-equals

Weekly Downloads

35,682

Version

2.0.0

License

MIT

Unpacked Size

3.56 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus