|
|
|
|
|
by Klathmon
3324 days ago
|
|
The only one i've used before is Bluebird's `promisifyAll` method. So when you require libraries, you can do so like: const fs = Promise.promisifyAll(require('fs'))
// ... later
const fileContents = await fs.readFileAsync('filename.txt')
Basically it just adds "Async" after all functions that use node style callbacks. |
|