deepie-merge
Yay, another deep merge
Usage
npm i deepie-merge
import {deepMerge} from "deepie-merge";
deepMerge({a: [1]}, {a: [2]});
deepMerge({a: [1]}, {a: [2]}, {arrayExtend: true});
deepMerge({a: [1], b: [1]}, {a: [2], b: [2]}, {arrayExtend: ["a"]});
API
deepMerge(dst, src, options)
dst
any: Destination valuesrc
any: Source valueoptions
object:
arrayExtend
boolean or string[]: Whether to extend arrays instead of replacing them. When passed a string array, it will only extend the object keys provided in that array.maxRecursions
number: Amount of nesting levels to recurse into. Default: 10
© silverwind, distributed under BSD licence