Skip to content

intersectionKeys

Subhajit Sahu edited this page Dec 8, 2022 · 12 revisions

Obtain keys present in all objects.

Similar: intersectionKeys, intersection.
Similar: isDisjoint, union, intersection, difference, symmetricDifference.


function intersectionKeys(...xs)
// xs: objects
const object = require('extra-object');

var x = {a: 1, b: 2, c: 3, d: 4};
var y = {b: 20, c: 30, e: 50};
object.intersectionKeys(x, y);
// → Set(2) { 'b', 'c' }


References

Clone this wiki locally