Merge pull request #915 from neoarma/patch-1
Update arguments order of `then` in Part 1, 11.6 Promisification
This commit is contained in:
commit
e73bbce0f2
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