merge-light - npm
merge-light
: merge objects into first argument object.
thin merge copy.
PREPARE:
for node.js
$ npm install merge-light --save
var merge = ;
or
for browsers
https://lightspeedworks.github.io/merge-light/merge-light.js
USAGE:
destination =
EXAMPLES:
merge object into first object.
var merge = ; var a = x:1;var b = y:2; ;console; // -> a = {x:1, y:2}console; // -> b = {y:2}
merge object into first object and return merged first object.
var merge = ; var a = x:1;var b = y:2; var c = ;console; // -> a = {x:1, y:2}console; // -> b = {y:2}console; // -> c = {x:1, y:2}console; // -> true
create a new object and merge rest of arguments objects.
var merge = ; var a = x:1;var b = y:2;var c = z:3; var d = ;console; // -> a = {x:1}console; // -> b = {y:2}console; // -> c = {z:3}console; // -> d = {x:1, y:2, z:3}
merge objects, if destination has same property already, then does not copied.
var merge = ; var a = x:1 z:3;var b = y:22;var c = z:33;var d = w:44; var e = ;console; // -> a = {x:1, z:3}console; // -> b = {y:22}console; // -> c = {z:33}console; // -> d = {w:44}console; // -> d = {x:1, z:3, y:22, w:44}
LICENSE:
MIT