object/merge
v0.0.1
0.0.1
Collaborators
Gravatar for undefined
0
MIT
PUBLIC
0
0     DEPENDENCIES
BuildPass

Merges multiple objects into one

Use object/merge in your project
npm i @bit/bit.utils.object.merge

merge ()

Merges multiple objects into one

Example

const o1 = { a: 1 };
const o2 = { b: 2 };
const o3 = { c: 3 };

const obj = merge(o1, o2, o3);
console.log(obj); // { a: 1, b: 2, c: 3 }
console.log(o1);  // { a: 1 } does not mutate objects

Test Summary


merge the merge fucntion should existPass
merge should merge two objects into onePass
merge should merge three objects into onePass
merge should not mutate the original objectsPass
merge return empty object if an empty object instertedPass
merge return empty object if no arguments insertedPass