Optionally handle merging maps/sets
goliatone opened this issue · comments
goliatone commented
Same as with #7 being able to handle arrays, we should be able to merge maps/sets.
Note that Object.assign
would you overwrite the property.
goliatone commented
let source = new Set(...);
let target = new Set(...);
source.forEach(target.add, source);
let source = new Map(...);
let target = new Map(...);
source.forEach((value, key) => target.set(key, value));