buffer-equals

Node.js 0.12 buffer.equals() ponyfill

Just use `Buffer#equals()`. It has been available since Node.js 0.12.
Last updated 6 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install buffer-equals 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.0                                ...           latest (6 years ago)

5 Versions

  • 2.0.0 [deprecated]           ...           6 years ago
  • 1.0.4                                ...           8 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |