Merge pull request #915 from neoarma/patch-1

Update arguments order of `then` in Part 1, 11.6 Promisification
This commit is contained in:
Ilya Kantor 2019-04-17 08:40:06 +03:00 committed by GitHub
commit e73bbce0f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ function promisify(f, manyArgs = false) {
// usage:
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.