Skip to content

Commit

Permalink
Verify the README with jsmd
Browse files Browse the repository at this point in the history
  • Loading branch information
vesln committed Nov 24, 2013
1 parent da836ca commit a475b09
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 7 additions & 5 deletions README.md
Expand Up @@ -24,12 +24,14 @@ var obj = {

Expect:

```js
var getPathValue = require('pathval');
<!-- js
var getPathValue = require('./');
-->

getPathValue('prop1.str', obj); // Hello
getPathValue('prop1.att[2]', obj); // b
getPathValue('prop2.arr[0].nested', obj); // Universe
```js
getPathValue('prop1.str', obj); // => "Hello"
getPathValue('prop1.arr[2]', obj); // => "c"
getPathValue('prop2.arr[0].nested', obj); // => "Universe"
```

## Installation
Expand Down
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"test": "mocha test/*.test.js",
"coverage": "istanbul cover ./node_modules/.bin/_mocha test/*.test.js",
"coveralls": "istanbul cover ./node_modules/.bin/_mocha test/*.test.js --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
"coveralls": "istanbul cover ./node_modules/.bin/_mocha test/*.test.js --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"test-readme": "jsmd README.md"
},
"repository": {
"type": "git",
Expand All @@ -17,7 +18,8 @@
"mocha": "~1.13.0",
"chai": "~1.8.1",
"coveralls": "~2.3.0",
"istanbul": "~0.1.44"
"istanbul": "~0.1.44",
"jsmd": "~0.2.0"
},
"author": "Veselin Todorov <hi@vesln.com>",
"license": "MIT"
Expand Down

0 comments on commit a475b09

Please sign in to comment.