Package Exports
- raydiff
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 (raydiff) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
raydiff
Filters array by removing matching elements contained in one or more additional arrays.
Install
$ npm install raydiff --save
Usage
Returns the difference between the first array and additional arrays.
var diff = require('raydiff');
var a = ['a', 'b', 'c', 'd'];
var b = ['b', 'c'];
console.log(diff(a, b))
//=> ['a', 'd']
Benchmarks
raydiff versus arr-diff & array-differ, using arr-diff's own benchmark tests, on Mar 05, 2017:
#benchmark\fixtures\long.js (94529 bytes)
array-differ x 360 ops/sec ±0.12% (83 runs sampled)
arr-diff x 507 ops/sec ±1.14% (57 runs sampled)
raydiff x 861 ops/sec ±0.09% (88 runs sampled)
#benchmark\fixtures\med.js (708 bytes)
array-differ x 96,510 ops/sec ±0.96% (88 runs sampled)
arr-diff x 215,471 ops/sec ±0.76% (88 runs sampled)
raydiff x 545,171 ops/sec ±1.18% (88 runs sampled)
#benchmark\fixtures\short.js (60 bytes)
array-differ x 178,184 ops/sec ±0.96% (86 runs sampled)
arr-diff x 311,669 ops/sec ±0.57% (90 runs sampled)
raydiff x 1,418,764 ops/sec ±1.58% (86 runs sampled)
Author
Kirk Burleson
==> github/kirkBurleson