From 8d189197531b56b32e2397585bddd2bb22221dc4 Mon Sep 17 00:00:00 2001 From: jsx Date: Fri, 23 Nov 2018 09:09:18 +0530 Subject: [PATCH] Update README to mention util.promisify() (#2824) Update README.md to mention that util.promisify can be used to convert a regular function that takes a callback to return a promise instead. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d1b705771..2e4293234 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,8 @@ Several alternative interfaces are provided by the request team, including: - [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises) - [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises) +Also, [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original), which is available from Node.js v8.0 can be used to convert a regular function that takes a callback to return a promise instead. + [back to top](#table-of-contents)