-
Notifications
You must be signed in to change notification settings - Fork 1
intersectionKeys
Subhajit Sahu edited this page Jun 12, 2020
·
12 revisions
Gives keys present in all objects. 🏃 📼 📦 🌔 📒
Similar: unionKeys, intersectionKeys.
object.intersectionKeys(...xs);
// xs: objects
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.intersectionKeys(x, y);
// Set(2) { 'b', 'c' }