-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Geta/develop
Develop
- Loading branch information
Showing
3 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
language: node_js | ||
node_js: | ||
- 8 | ||
- 7 | ||
- 6 | ||
- "0.10" | ||
- "0.12" | ||
- "iojs" | ||
env: | ||
- TEST_SUITE=unit | ||
script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
# NestedObjectAssign | ||
[![Build Status](https://travis-ci.org/Geta/NestedObjectAssign.svg?branch=master)](https://travis-ci.org/Geta/NestedObjectAssign) | ||
[![dependencies Status](https://david-dm.org/geta/NestedObjectAssign/status.svg)](https://david-dm.org/geta/NestedObjectAssign) | ||
|
||
This package extends the functionality given by Object.assign() to also include the values of nested objects. | ||
|
||
## Installation | ||
``` | ||
npm install --save nested-object-assign | ||
``` | ||
|
||
## Usage | ||
Add the empty object first, then any objects you want merged into it after. unlimited amount of params. | ||
Works just like Object.Assign, add an empty object first (the object you want the other objects merged into), then as many objects as you wish afterwards, comma separated. | ||
|
||
```js | ||
import nestedObjectAssign from 'nested-object-assign'; | ||
const defaults = {} | ||
|
||
Example: `nestedObjectAssign({}, defaults, object1, object2, object3)` | ||
function test() { | ||
let data = nestedObjectAssign({}, defaults, object1, object2, object3); | ||
} | ||
``` | ||
|
||
## Tests | ||
Tests are done using mocha. to run tests, simply type `npm run tests`. | ||
Tests were done for these node.js versions: | ||
* 8 | ||
* 7 | ||
* 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters