1.1.0 • Published 4 years ago

deepmergefn v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

deepMerge

npm Build Status Number of Downloads

Mixes two data objects in depth

Installation

Install package executing these command:

    npm i deepmergefn

Usage

const deepMerge = require("deepmergefn");

const object1 = {
  name: "John",
  lastname: "Doe",
  list: [
    {
      foo: 2,
    },
    {
      var: "aaa",
    },
  ],
};

const object2 = {
  name: "John",
  age: 30,
  list: [
    {
      foobar: "lastaaa",
    },
  ],
};

const result = deepMerge(object1, object2);

Returns

{
  "name": "John",
  "lastname": "Doe",
  "list": [
    {
      "foo": 2,
      "foobar": "lastaaa"
    },
    {
      "var": "aaa"
    }
  ],
  "age": 30
}

Demo

You can test this package here

License

MIT

1.1.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago