http-as-promised
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -0,3 +1,5 @@ | ||
'use strict'; | ||
var createError = require('create-error'), | ||
statusCodes = require('./http.statusCodes') | ||
statusCodes = require('./http.statusCodes'), | ||
HTTPError = createError('HTTPError', { | ||
@@ -4,0 +6,0 @@ range: 'xxx', |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var Promise = require('bluebird'), | ||
@@ -136,3 +138,3 @@ onPossiblyUnhandledRejection = Promise.onPossiblyUnhandledRejection.bind(Promise), | ||
function assign(target, extension){ | ||
function assign(target, extension){ /*eslint-disable curly*/ | ||
if (typeof extension === 'object' && extension !== null) | ||
@@ -139,0 +141,0 @@ for (var k in extension) |
@@ -10,6 +10,6 @@ /* http://httpstatus.es/ | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
@@ -22,5 +22,5 @@ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* SOFTWARE. | ||
*/ | ||
*/ | ||
module.exports = [{ | ||
module.exports = [{ /*eslint quotes: [2, "double"], comma-spacing: 0*/ | ||
statusCode: 400, | ||
@@ -27,0 +27,0 @@ title: "Bad Request", |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"author": "James Cready <jcready@gmail.com> (http://stackoverflow.com/users/1397319/idbehold)", | ||
@@ -36,3 +36,3 @@ "homepage": "https://github.com/jcready/http-as-promised", | ||
"scripts": { | ||
"test": "mocha test", | ||
"test": "mocha test && eslint ./", | ||
"test-cov": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", | ||
@@ -42,14 +42,15 @@ "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- -u exports -R spec && open coverage/lcov-report/http-as-promised/index.html" | ||
"dependencies": { | ||
"bluebird": "^2.3.2", | ||
"bluebird": "^2.9.12", | ||
"create-error": "^0.3.1", | ||
"request": "^2.42.0" | ||
"request": "^2.53.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.9.1", | ||
"chai": "^2.1.1", | ||
"chai-as-promised": "^4.1.1", | ||
"coveralls": "^2.11.1", | ||
"eslint": "^0.15.1", | ||
"istanbul": "^0.3.2", | ||
"mocha": "^1.21.4", | ||
"mocha": "^2.1.0", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"nock": "^0.46.0", | ||
"nock": "^1.1.0", | ||
"sinon": "^1.10.3", | ||
@@ -56,0 +57,0 @@ "sinon-chai": "^2.5.0" |
@@ -6,2 +6,4 @@ # HTTP as Promised — Promisified HTTP client. | ||
[![Test Coverage][coveralls-image]][coveralls-url] | ||
[![Code Climate][codeclimate-image]][codeclimate-url] | ||
[![Dependencies][dependencies-image]][dependencies-url] | ||
@@ -202,2 +204,6 @@ Using [bluebird][bluebird] and [create-error][create-error] to make [request][request] easier to use. The most notible difference between this library and simply "promisifying" the request module is that this library will automatically reject the promise with an `HTTPError` if the response idicates an HTTP error (e.g. `response.statusCode >= 400`). HTTP as Promised supports all the same [options you'd pass to request](https://github.com/mikeal/request/blob/master/README.md#requestoptions-callback) as well as all of [request's convenience methods](https://github.com/mikeal/request/blob/master/README.md#convenience-methods). | ||
[coveralls-url]: https://coveralls.io/r/jcready/http-as-promised?branch=master | ||
[dependencies-image]: https://img.shields.io/david/jcready/http-as-promised.svg?style=flat-square | ||
[dependencies-url]: https://david-dm.org/jcready/http-as-promised | ||
[codeclimate-image]: https://img.shields.io/codeclimate/github/jcready/http-as-promised.svg?style=flat-square | ||
[codeclimate-url]: https://codeclimate.com/github/jcready/http-as-promised | ||
@@ -204,0 +210,0 @@ [bluebird]: https://www.npmjs.org/package/bluebird |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
25549
9
392
0
210
10
Updatedbluebird@^2.9.12
Updatedrequest@^2.53.0