@henry781/deep-merge
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

deep-merge

Build Status

Deep merge allows to merge with context.

const obj1 = {
    A: 'A obj1',
};
const obj2 = {
    B: 'B obj2',
};

let result = Merge.merge({}, obj1, {context: 'obj1'});
result = Merge.merge(result, obj2, {context: 'obj2'});

console.log(result._context.A);
// obj1

console.log(result._context.B);
// obj2

console.log(result);
// {
//    A: "A obj1",
//    B: "B obj2"
// }

Readme

Keywords

none

Package Sidebar

Install

npm i @henry781/deep-merge

Weekly Downloads

36

Version

0.4.0

License

ISC

Unpacked Size

17.3 kB

Total Files

10

Last publish

Collaborators

  • henry781