Skip to content

Commit 88a545a

Browse files
committed
Updated documentation
1 parent 7db9030 commit 88a545a

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
language: node_js
22
node_js:
3+
- 8
34
- 7
45
- 6
5-
- "0.10"
6-
- "0.12"
7-
- "iojs"
86
env:
97
- TEST_SUITE=unit
108
script:

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
# NestedObjectAssign
2+
[![Build Status](https://travis-ci.org/Geta/NestedObjectAssign.svg?branch=master)](https://travis-ci.org/Geta/NestedObjectAssign)
3+
24
This package extends the functionality given by Object.assign() to also include the values of nested objects.
35

6+
## Installation
7+
```
8+
npm install --save nested-object-assign
9+
```
10+
411
## Usage
5-
Add the empty object first, then any objects you want merged into it after. unlimited amount of params.
12+
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.
13+
14+
```js
15+
import nestedObjectAssign from 'nested-object-assign';
16+
const defaults = {}
617

7-
Example: `nestedObjectAssign({}, defaults, object1, object2, object3)`
18+
function test() {
19+
let data = nestedObjectAssign({}, defaults, object1, object2, object3);
20+
}
21+
```
822

923
## Tests
10-
Tests are done using mocha. to run tests, simply type `npm run tests`.
24+
Tests were done for these node.js versions:
25+
* 8
26+
* 7
27+
* 6

0 commit comments

Comments
 (0)