minimal-request-promise
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -1,5 +0,6 @@ | ||
/*global module, Promise, require */ | ||
/*global module, require, global */ | ||
var https = require('https'); | ||
module.exports = function (callOptions) { | ||
module.exports = function (callOptions, PromiseImplementation) { | ||
'use strict'; | ||
var Promise = PromiseImplementation || global.Promise; | ||
return new Promise(function (resolve, reject) { | ||
@@ -6,0 +7,0 @@ var req = https.request(callOptions); |
{ | ||
"name": "minimal-request-promise", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A+ Promise interface to Node.js HTTPS request, with no dependencies", | ||
@@ -14,2 +14,5 @@ "main": "index.js", | ||
], | ||
"scripts": { | ||
"test": "node spec/support/jasmine-runner.js" | ||
}, | ||
"homepage": "https://github.com/gojko/minimal-request-promise", | ||
@@ -21,3 +24,8 @@ "repository": { | ||
"author": "Gojko Adzic <gojko@gojko.com> http://gojko.net", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"devDependencies": { | ||
"fake-http-request": "^1.2.0", | ||
"jasmine": "^2.4.1", | ||
"jasmine-spec-reporter": "^2.4.0" | ||
} | ||
} |
@@ -47,4 +47,17 @@ #Minimal Promise version of HTTPS request | ||
##Using with a different Promise library | ||
By default, this library uses the built-in `Promise` from Node.js. If you'd like to use a different A+ Promise library, just pass it in as the second argument. For example: | ||
```javascript | ||
var bluebird = require('bluebird'), | ||
requestPromise = require('minimal-request-promise'), | ||
options = { | ||
// some options here ... | ||
}; | ||
requestPromise(options, bluebird).then(report); | ||
``` | ||
##License | ||
MIT |
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
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
6564
7
107
63
3
2