digest-fetch
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "digest-fetch", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "digest auth request plugin for fetch/node-fetch", | ||
"main": "digest-fetch-src.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"lint": "eslint --plugin markdown --ext js,md .", | ||
"test": "mocha --check-leaks --bail --no-exit --reporter spec test/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --no-exit --reporter dot test/", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --no-exit --reporter spec test/", | ||
"build": "NODE_ENV=\"production\" webpack --optimize-minimize" | ||
@@ -29,4 +32,12 @@ }, | ||
"webpack": "^4.6.0", | ||
"webpack-cli": "^2.0.15" | ||
} | ||
"webpack-cli": "^2.0.15", | ||
"after": "0.8.2", | ||
"eslint": "3.19.0", | ||
"eslint-plugin-markdown": "1.0.0-beta.6", | ||
"express": "4.16.2", | ||
"istanbul": "0.4.5", | ||
"mocha": "2.5.3", | ||
"supertest": "1.1.0" | ||
}, | ||
"homepage": "https://github.com/devfans/digest-fetch#readme" | ||
} |
# digest-fetch | ||
[![NPM Version][npm-image]][npm-url] | ||
[![NPM Downloads][downloads-image]][downloads-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Test Coverage][coveralls-image]][coveralls-url] | ||
digest auth request plugin for fetch/node-fetch | ||
## Installation | ||
``` | ||
// dependencies for node | ||
npm install crypto-js node-fetch | ||
// dependencies for browser | ||
<script src='path-to-crypto-js.js'></script> | ||
npm install digest-fetch | ||
``` | ||
## Get Started | ||
``` | ||
const DigestFetch = require('digest-fetch') | ||
const client = DigestFetch('user', 'password', console) // console as logger, optional parameter | ||
// do request same way as fetch or node-fetch | ||
const url = '' | ||
const options = {} | ||
client.fetch(url, options) | ||
.then(resp=>resp.json()) | ||
.then(data=>console.log(data)) | ||
.catch(e=>console.error(e)) | ||
``` | ||
[npm-image]: https://img.shields.io/npm/v/digest-fetch.svg | ||
[npm-url]: https://npmjs.org/package/digest-fetch | ||
[travis-image]: https://img.shields.io/travis/devfans/digest-fetch/master.svg | ||
[travis-url]: https://travis-ci.org/devfans/digest-fetch | ||
[coveralls-image]: https://img.shields.io/coveralls/devfans/digest-fetch/master.svg | ||
[coveralls-url]: https://coveralls.io/r/devfans/digest-fetch?branch=master | ||
[downloads-image]: https://img.shields.io/npm/dm/digest-fetch.svg | ||
[downloads-url]: https://npmjs.org/package/digest-fetch | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
152769
10
466
1
44
14
1