unionKeys - nodef/extra-object GitHub Wiki

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