0.3.4 • Published 2 months ago

@hckrnews/deep-merge v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Object deep merge

NPM version Coverage Quality Gate Status Bugs Code Smells Technical Debt Vulnerabilities Maintainability Rating Reliability Rating Security Rating

Deep merge objects.

Zero dependencies.

Installation

npm install @hckrnews/deep-merge or yarn add @hckrnews/deep-merge

Test the package

npm run test or yarn test

How to use

npm i @hckrnews/deep-merge
import { deepMerge } from '@hcklrnews/deep-merge';

const obj1 = {
    a: 1,
    b: 1,
    c: { x: 1, y: 1 },
    d: [1, 1]
}
const obj2 = {
    b: 2,
    c: { y: 2, z: 2 },
    d: [2, 2],
    e: 2
}
const result = deepMerge(obj1, obj2)

const expectedResult = {
    a: 1,
    b: 2,
    c: { x: 1, y: 2, z: 2 },
    d: [1, 1, 2, 2],
    e: 2
}
0.3.4

2 months ago

0.3.3

3 months ago

0.3.2

3 months ago

0.3.1

4 months ago

0.3.0

5 months ago

0.2.1

5 months ago

0.1.2

6 months ago

0.2.0

5 months ago

0.2.2

5 months ago

0.1.1

6 months ago

0.1.0

6 months ago