util-promisifyall
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "util-promisifyall", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "promisifyAll with node's native promisify function", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,7 +13,7 @@ # util-promisifyAll | ||
### Example Usage | ||
This library wraps a any callback-based library and attempts to promisify | ||
any function available on the module's export or its prototype. | ||
This library wraps any traditional callback-based library and attempts | ||
to promisify any function exported by the module or its prototype. | ||
It creates and exposes a "promisified" version of each function, which can | ||
then be invoked by appending `Async` to the old function name, such as: | ||
It does so by creating and exposing a "promisified" version of each function, | ||
which can then be invoked by appending `Async` to the old function name, such as: | ||
@@ -26,4 +26,5 @@ ``` | ||
try { | ||
const res = fs.readdirAsync(dir); | ||
const res = await fs.readdirAsync(dir); | ||
console.log(res); | ||
return res; | ||
} catch (error) { | ||
@@ -30,0 +31,0 @@ throw error; |
6797
32