Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
sparshithNR authored and stefanpenner committed Dec 4, 2019
1 parent 83ae0fe commit b870a31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,27 @@ npm install --save-dev broccoli-merge-trees
```

## Usage

1. With `new`
```js
var BroccoliMergeTrees = require('broccoli-merge-trees');

var mergedNode = new BroccoliMergeTrees(inputNodes, options);
```
2. As a `function call`
```js
var broccoliMergeTrees = require('broccoli-merge-trees');

var mergedNode = broccoliMergeTrees(inputNodes, options);
```

3. As a `base class`
```js
const { MergeTrees } = require('broccoli-merge-trees');

class AdavancedMergeTrees extends MergeTrees {
// add custom methods and implementations here
}

```

* **`inputNodes`**: An array of nodes, whose contents will be merged
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ module.exports = function mergeTrees(...params) {
return new BroccoliMergeTrees(...params);
};

module.exports.MergeTrees = MergeTrees;
module.exports.MergeTrees = BroccoliMergeTrees;

0 comments on commit b870a31

Please sign in to comment.