merge-plus
A highly flexible, more robust, non-destructive deep object merge
- accepts multiple arguments of any type
- automatically extracts objects from array(s) of objects
- due to dynamic type checking of arguments, only applies objects
- non-destructive
Now you can go pretty weird without messing up!
var merge= ; // as expected:var test= ;// { hello: { world: '!' } } // can mix multiple arrays of objects and objectsvar test= ;console;// { a: 1, x: { deep: { deeper: ':)' } }, mixed: true, c: 3 } // ignores non-object type argumentsvar test= console;// { a: 1,// b: 2,// c: { deep: { deeper: true } },// d: [ { huh: '?' } ],// e: 1,// f: 4 }