deep-extend

WebJar for deep-extend

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

deep-extend
Last Version

Last Version

0.6.0
Release Date

Release Date

Type

Type

jar
Description

Description

deep-extend
WebJar for deep-extend
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/unclechu/node-deep-extend

Download deep-extend

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/deep-extend/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>deep-extend</artifactId>
    <version>0.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/deep-extend/
implementation 'org.webjars.npm:deep-extend:0.6.0'
// https://jarcasting.com/artifacts/org.webjars.npm/deep-extend/
implementation ("org.webjars.npm:deep-extend:0.6.0")
'org.webjars.npm:deep-extend:jar:0.6.0'
<dependency org="org.webjars.npm" name="deep-extend" rev="0.6.0">
  <artifact name="deep-extend" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='deep-extend', version='0.6.0')
)
libraryDependencies += "org.webjars.npm" % "deep-extend" % "0.6.0"
[org.webjars.npm/deep-extend "0.6.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Deep Extend

Recursive object extending.

Build Status

NPM

Install

$ npm install deep-extend

Usage

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 test

Changelog

CHANGELOG.md

Any issues?

Please, report about issues here.

License

MIT

Versions

Version
0.6.0
0.5.1
0.4.2
0.4.1