Package Exports
- compare-sets
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 (compare-sets) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
compare-sets
Given two sets, compare-sets will return sets of the added, retained, and removed items
Installation
npm install [--save] compare-setsUsage
var oldSet = new Set([1, 2, 3, 4])
var newSet = new Set([2, 4, 5, 6])
compareSets(oldSet, newSet)
// {
// added: Set { 5, 6 },
// retained: Set { 2, 4 },
// remvoed: Set { 1, 3 }
// }Caveats
This library assumes an environment with Set available