set-diffs
v1.0.1
Published
Get diff (added, removed, changed, unchanged) from two Sets
Downloads
5
Readme
set-diffs
Get diff (added, removed, changed, unchanged) from two Sets
Installation
Download node at nodejs.org and install it, if you haven't already.
npm install set-diffs --save
Usage
'use strict';
var getDiff = require("set-diffs");
var a = new Set([1, 2, 3]);
var b = new Set([3, 4, 5]);
var diff = getDiff(a, b);
console.log('add', diff.add);
console.log('remove', diff.remove);
console.log('keep', diff.keep);
Tests
npm install
npm test
Dependencies
- es6-set: ECMAScript6 Set polyfill
Dev Dependencies
- array-from: A ponyfill for the ES 2015 (ES6)
Array.from()
. - fill-range: Fill in a range of numbers or letters, optionally passing an increment or multiplier to use.
- tape: tap-producing test harness for node and browsers
License
MIT
Generated by package-json-to-readme