Update arguments order of then
The first argument should be for handling a successful result, and the second for error.
This commit is contained in:
parent
0a95d04b17
commit
dc2da3097e
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ function promisify(f, manyArgs = false) {
|
||||||
|
|
||||||
// usage:
|
// usage:
|
||||||
f = promisify(f, true);
|
f = promisify(f, true);
|
||||||
f(...).then(err => ..., arrayOfResults => ...)
|
f(...).then(arrayOfResults => ..., err => ...)
|
||||||
```
|
```
|
||||||
|
|
||||||
In some cases, `err` may be absent at all: `callback(result)`, or there's something exotic in the callback format, then we can promisify such functions manually.
|
In some cases, `err` may be absent at all: `callback(result)`, or there's something exotic in the callback format, then we can promisify such functions manually.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue