Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

awaitable-async

marcelo-mason68MIT0.0.6

Async wrapped with promises

async, caolan, wrapped, await, promises

readme

Awaitable Async

Every method in caolan/async wrapped in promises.

const async = require('awaitable-async')

Examples

Get results

const results = await async.map(['file1','file2','file3'], fs.stat)  
console.log(results)

Wait until finished

await async.eachSeries([1,2,3,4,5], num =>{
  console.log(`${num} done`)
})  
console.log('All done!')

Catch errors

try {
  await async.each(list)  
} catch(err){
  console.log('oops!')  
}