unionKeys - nodef/extra-lists GitHub Wiki

Obtain keys present in any lists.

Similar: unionKeys, intersectionKeys.

function unionKeys(...xs)
// xs: all lists
const xlists = require('extra-lists');

var x = ['a', 'b', 'c', 'd'], [1, 2, 3, 4](/nodef/extra-lists/wiki/'a',-'b',-'c',-'d'],-[1,-2,-3,-4);
var y = ['b', 'c', 'e'], [20, 30, 50](/nodef/extra-lists/wiki/'b',-'c',-'e'],-[20,-30,-50);
xlists.unionKeys(x, y);
// → Set(5) { 'a', 'b', 'c', 'd', 'e' }

References