Skip to content

unionKeys

Subhajit Sahu edited this page Jun 17, 2020 · 14 revisions

Gives keys present in any entries. 🏃 📼 📦 🌔 📒

Similar: unionKeys, intersectionKeys.

entries.unionKeys(...xs);
// xs: n entries
const map = require('extra-map');

var x = new Map([['a', 1], ['b', 2], ['c', 3], ['d', 4]]);
var y = new Map([['b', 20], ['c', 30], ['e', 50]]);
map.unionKeys(x, y);
// Set(5) { 'a', 'b', 'c', 'd', 'e' }

references

Clone this wiki locally