Skip to content

Commit

Permalink
Readme maintenance + tests
Browse files Browse the repository at this point in the history
- drop the examples folder
- use jsmd to test the readme example
- drop the bower section from the readme
  • Loading branch information
TehShrike committed Sep 27, 2016
1 parent 4f57a2d commit 7102fcc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
34 changes: 16 additions & 18 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,30 @@ Merge the enumerable attributes of two objects deeply.
example
=======

```js
var util = require('util')
var merge = require('deepmerge')
<!--js
var merge = require('./')
-->

```js
var x = { foo: { bar: 3 },
array: [ { does: 'work', too: [ 1, 2, 3 ] } ] }
var y = { foo: { baz: 4 },
quux: 5,
array: [ { does: 'work', too: [ 4, 5, 6 ] }, { really: 'yes' } ] }

console.log(util.inspect(merge(x, y), false, null))
```

output:

```js
{ foo: { bar: 3, baz: 4 },
var expected = { foo: { bar: 3, baz: 4 },
array: [ { does: 'work', too: [ 1, 2, 3, 4, 5, 6 ] }, { really: 'yes' } ],
quux: 5 }

merge(x, y) // => expected
```

methods
=======

```
var merge = require('deepmerge')
```

merge(x, y)
-----------
Expand All @@ -50,21 +49,20 @@ install

With [npm](http://npmjs.org) do:

```
```sh
npm install deepmerge
```

For the browser, you can install with [bower](http://bower.io/):

```
bower install deepmerge
```

test
====

With [npm](http://npmjs.org) do:

```
```sh
npm test
```

license
=======

MIT
5 changes: 0 additions & 5 deletions example/merge.js

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"node": ">=0.4.0"
},
"scripts": {
"test": "tap test/*.js"
"test": "tap test/*.js && jsmd README.markdown"
},
"dependencies": {},
"devDependencies": {
"jsmd": "0.3.1",
"tap": "~0.4.8"
},
"license": "MIT"
Expand Down

0 comments on commit 7102fcc

Please sign in to comment.