Skip to content

unionKeys

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

Obtain keys present in any object.

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


function unionKeys(...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.unionKeys(x, y);
// → Set(5) { 'a', 'b', 'c', 'd', 'e' }


References

Clone this wiki locally