makepromise
Advanced tools
Comparing version 3.0.3 to 3.1.0
@@ -11,6 +11,6 @@ let erotic = require('erotic'); if (erotic && erotic.__esModule) erotic = erotic.default; | ||
* Get a promise from a function which otherwise accepts a callback. | ||
* @param {function} fn A function to promisify. | ||
* @param {any[]|any} [args] An array of arguments to use in the call, or a single argument. | ||
* @param {any} [resolveValue] A value to override the value with which the promise will be resolved. | ||
* @returns {Promise<any>} A promise resolved on callback invocation without an error and rejected on callback called with an error. | ||
* @param {Function} fn A function to promisify. | ||
* @param {*|Array<*>} [args] An array of arguments to use in the call, or a single argument. | ||
* @param {*} [resolveValue] A value to override the value with which the promise will be resolved. | ||
* @returns {Promise<*>} A promise resolved on callback invocation without an error and rejected on callback called with an error. | ||
*/ | ||
@@ -47,3 +47,3 @@ async function makePromise(fn, args, resolveValue) { | ||
} | ||
fn.apply(fn.this, allArgs) | ||
fn(...allArgs) | ||
}) | ||
@@ -50,0 +50,0 @@ return res |
@@ -0,1 +1,8 @@ | ||
## 10 April 2019 | ||
### [3.1.0](git+https://github.com/artdecocode/makepromise/compare/v3.0.3...v3.1.0) | ||
- [types] Tidy up types for _Google Closure Compiler_ & _Depack_. | ||
- [deps] Update `erotic` & unlock dependencies. | ||
## 2 April 2019 | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "makepromise", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "Make a Promise from a function with a callback and preserve its error stack.", | ||
@@ -14,3 +14,3 @@ "main": "build/index.js", | ||
"doc": "NODE_DEBUG=doc doc documentary -o README.md", | ||
"e": "node example" | ||
"e": "alanode" | ||
}, | ||
@@ -46,12 +46,12 @@ "files": [ | ||
"devDependencies": { | ||
"alamode": "1.9.0", | ||
"catchment": "3.2.2", | ||
"documentary": "1.23.2", | ||
"wrote": "1.4.0", | ||
"alamode": "^1.9.2", | ||
"catchment": "^3.2.3", | ||
"documentary": "^1.23.4", | ||
"wrote": "^1.4.0", | ||
"yarn-s": "1.1.0", | ||
"zoroaster": "3.11.2" | ||
"zoroaster": "^3.11.4" | ||
}, | ||
"dependencies": { | ||
"erotic": "2.0.3" | ||
"erotic": "^2.1.0" | ||
} | ||
} |
@@ -11,6 +11,6 @@ import erotic from 'erotic' | ||
* Get a promise from a function which otherwise accepts a callback. | ||
* @param {function} fn A function to promisify. | ||
* @param {any[]|any} [args] An array of arguments to use in the call, or a single argument. | ||
* @param {any} [resolveValue] A value to override the value with which the promise will be resolved. | ||
* @returns {Promise<any>} A promise resolved on callback invocation without an error and rejected on callback called with an error. | ||
* @param {Function} fn A function to promisify. | ||
* @param {*|Array<*>} [args] An array of arguments to use in the call, or a single argument. | ||
* @param {*} [resolveValue] A value to override the value with which the promise will be resolved. | ||
* @returns {Promise<*>} A promise resolved on callback invocation without an error and rejected on callback called with an error. | ||
*/ | ||
@@ -47,5 +47,5 @@ export default async function makePromise(fn, args, resolveValue) { | ||
} | ||
fn.apply(fn.this, allArgs) | ||
fn(...allArgs) | ||
}) | ||
return res | ||
} |
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
11750
+ Added@artdeco/clean-stack@1.2.1(transitive)
+ Addederotic@2.1.1(transitive)
- Removed@artdeco/clean-stack@1.0.1(transitive)
- Removederotic@2.0.3(transitive)
Updatederotic@^2.1.0