JSPM

arraybuffer-equal

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2139
  • Score
    100M100P100Q114446F
  • License MIT

Determines if two array buffers contain the exact same content

Package Exports

  • arraybuffer-equal

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 (arraybuffer-equal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

arraybuffer-equal

Determines if two array buffers contain the exact same content. Works in node 0.10+ and in the browser using browserify.

Build Status

Installation

npm install --save arraybuffer-equal

Usage

var isEqual = require('arraybuffer-equal');

var buf1 = new Uint8Array([0x50, 0x0a]).buffer;
var buf2 = new Uint8Array([0x50, 0x0a]).buffer;
var buf3 = new Uint8Array([0x50, 0x0b]).buffer;
var buf4 = new Uint8Array([0x50, 0x0b, 0x15]).buffer;

assert(isEqual(buf1, buf1));
assert(isEqual(buf1, buf2));
assert(!isEqual(buf1, buf3));
assert(!isEqual(buf1, buf4));

License

(c) 2015 Will Binns-Smith. Licensed MIT.