Just an example function:
// Merges objects | arrays
function merge(...values) {
return Object.assign(
{},
...values.map((value) =>
Array.isArray(value)
? Object.fromEntries(value.map((val) => [val, null]))
: value,
),
)
}
merge({k1: 1}, {k2: 2}) // {k1: 1, k2: 2} -