Update promisify.md

This commit is contained in:
Angelos Chalaris
2017-12-13 14:17:24 +02:00
committed by GitHub
parent babb858ce2
commit 36bff4628d

View File

@ -1,6 +1,9 @@
### Promisify
Use currying to return a function returning a Promise that calls the original function. Use the rest operator to pass in all the parameters. In Node 8+, you can use [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original)
Use currying to return a function returning a `Promise` that calls the original function.
Use the `...rest` operator to pass in all the parameters.
*In Node 8+, you can use [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original)*
```js
const promisify = func =>