Miss any of our Open RFC calls?Watch the recordings here! »

@extra-map/symmetric-difference.min

2.2.7 • Public • Published

Gives entries not present in both maps. 🏃 📼 📦 🌔 📒

Alternatives: symmetricDifference, symmetricDifference$.
Similar: union, intersection, difference, symmetricDifference, isDisjoint.
This is part of package extra-map.

This is browserified, minified version of @extra-map/symmetric-difference.
It is exported as global variable map_symmetricDifference.
CDN: unpkg, jsDelivr.

map.symmetricDifference(x, y);
// x: a map
// y: another map
const map = require('extra-map');
 
var x = new Map([['a', 1], ['b', 2], ['c', 3], ['d', 4]]);
var y = new Map([['c', 30], ['d', 40], ['e', 50], ['f', 60]]);
map.symmetricDifference(x, y);
// Map(4) { 'a' => 1, 'b' => 2, 'e' => 50, 'f' => 60 }
 
var y = new Map([['d', 40], ['e', 50], ['f', 60]]);
map.symmetricDifference(x, y);
// Map(5) { 'a' => 1, 'b' => 2, 'c' => 3, 'e' => 50, 'f' => 60 }

references

Install

npm i @extra-map/symmetric-difference.min

DownloadsWeekly Downloads

2

Version

2.2.7

License

MIT

Unpacked Size

10.9 kB

Total Files

19

Last publish

Collaborators

  • avatar