JSPM

buffer-equals

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 162541
  • Score
    100M100P100Q46834F
  • License MIT

Node.js 0.12 buffer.equals() ponyfill

Package Exports

  • buffer-equals

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (buffer-equals) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

License

MIT © Sindre Sorhus