Share your code. Components are building blocks, you are the architect.

object/merge
v1.0.0
1.0.0
0.0.1
MIT
PUBLIC
3
0     DEPENDENCIES
Build: pass
BuildPass
Build Status: pass
Merges multiple objects into one
bit
Contributors
Gravatar for undefinedGravatar for undefined
0

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use object/merge in your project
npm i @bit/bit.utils.object.merge
Copied

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