0.6.0 • Published 7 years ago
deep-extend v0.6.0
Deep Extend
Recursive object extending.
Install
$ npm install deep-extendUsage
var deepExtend = require('deep-extend');
var obj1 = {
  a: 1,
  b: 2,
  d: {
    a: 1,
    b: [],
    c: { test1: 123, test2: 321 }
  },
  f: 5,
  g: 123,
  i: 321,
  j: [1, 2]
};
var obj2 = {
  b: 3,
  c: 5,
  d: {
    b: { first: 'one', second: 'two' },
    c: { test2: 222 }
  },
  e: { one: 1, two: 2 },
  f: [],
  g: (void 0),
  h: /abc/g,
  i: null,
  j: [3, 4]
};
deepExtend(obj1, obj2);
console.log(obj1);
/*
{ a: 1,
  b: 3,
  d:
   { a: 1,
     b: { first: 'one', second: 'two' },
     c: { test1: 123, test2: 222 } },
  f: [],
  g: undefined,
  c: 5,
  e: { one: 1, two: 2 },
  h: /abc/g,
  i: null,
  j: [3, 4] }
*/Unit testing
$ npm testChangelog
Any issues?
Please, report about issues here.
License
0.6.0
7 years ago
0.5.1
8 years ago
0.5.0
8 years ago
0.4.2
8 years ago
0.4.1
10 years ago
0.4.0
11 years ago
0.3.3
11 years ago
0.3.2
11 years ago
0.3.1
11 years ago
0.3.0
11 years ago
0.2.11
11 years ago
0.2.10
11 years ago
0.2.9
11 years ago
0.2.8
12 years ago
0.2.7
12 years ago
0.2.6
12 years ago
0.2.5
13 years ago
0.2.4
13 years ago
0.2.2
14 years ago
0.2.1
14 years ago
0.2.0
14 years ago
