File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ before_install:
1919 # Setup Node.js version-specific dependencies
2020 - " test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul"
2121 - " test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
22- - " test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-promise eslint-plugin-standard"
22+ - " test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-markdown eslint-plugin- promise eslint-plugin-standard"
2323 # Update Node.js modules
2424 - " test ! -d node_modules || npm prune"
2525 - " test ! -d node_modules || npm rebuild"
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ $ npm install basic-auth
2020
2121## API
2222
23+ <!-- eslint-disable no-unused-vars -->
24+
2325``` js
2426var auth = require (' basic-auth' )
2527```
@@ -41,15 +43,19 @@ Pass a node request or koa Context object to the module exported. If
4143parsing fails ` undefined ` is returned, otherwise an object with
4244` .name ` and ` .pass ` .
4345
46+ <!-- eslint-disable no-unused-vars, no-undef -->
47+
4448``` js
45- var auth = require (' basic-auth' );
46- var user = auth (req);
49+ var auth = require (' basic-auth' )
50+ var user = auth (req)
4751// => { name: 'something', pass: 'whatever' }
4852```
4953
5054A header string from any other location can also be parsed with
5155` auth.parse ` , for example a ` Proxy-Authorization ` header:
5256
57+ <!-- eslint-disable no-unused-vars, no-undef -->
58+
5359``` js
5460var auth = require (' basic-auth' )
5561var user = auth .parse (req .getHeader (' Proxy-Authorization' ))
Original file line number Diff line number Diff line change 1313 "devDependencies" : {
1414 "eslint" : " 3.10.2" ,
1515 "eslint-config-standard" : " 6.2.1" ,
16+ "eslint-plugin-markdown" : " 1.0.0-beta.3" ,
1617 "eslint-plugin-promise" : " 3.4.0" ,
1718 "eslint-plugin-standard" : " 2.0.1" ,
1819 "istanbul" : " 0.4.5" ,
2728 "node" : " >= 0.6"
2829 },
2930 "scripts" : {
30- "lint" : " eslint ." ,
31+ "lint" : " eslint --plugin markdown --ext js,md ." ,
3132 "test" : " mocha --check-leaks --reporter spec --bail" ,
3233 "test-cov" : " istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/" ,
3334 "test-travis" : " istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
You can’t perform that action at this time.
0 commit comments