Comparing version 2.2.81 to 2.2.90
@@ -144,16 +144,20 @@ const realHttp = require("http"); | ||
const promisified = (opts, http) => { | ||
return new Promise((resolve, reject) => { | ||
phin(opts, (err, res) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(res); | ||
} | ||
}, http); | ||
}); | ||
}; | ||
if (util.promisify) { | ||
phin[util.promisify.custom] = (opts, http) => { | ||
return new Promise((resolve, reject) => { | ||
phin(opts, (err, res) => { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(res); | ||
} | ||
}, http); | ||
}); | ||
}; | ||
phin[util.promisify.custom] = promisified; | ||
} | ||
phin.promisified = promisified; | ||
module.exports = phin; |
{ | ||
"name": "phin", | ||
"version": "2.2.81", | ||
"version": "2.2.90", | ||
"description": "Ultra-simple, lightweight, dependency-free Node.JS HTTP request client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
<p align="center" style="text-align: center;"><img src="http://i.imgur.com/SSBM2Pw.png" width="200" alt="phin logo"/></p> | ||
<p align="center" style="text-align: center;"><img src="http://i.imgur.com/SSBM2Pw.png" width="150" alt="phin logo"/></p> | ||
@@ -3,0 +3,0 @@ --- |
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
11426
253