Description
A modern JavaScript tooling library for asynchronous operations using async/await and promises.
This library is a modernized alternative to a lot of libraries like Async.js that were created using the legacy callback style to handle asynchronous operations. Its goal is to be as complete as any of those libraries while being built from the very beginning with async/await and promises in mind.
modern-async alternatives and similar libraries
Based on the "Control Flow" category.
Alternatively, view modern-async alternatives based on common mentions on social networks and blogs.
-
Bluebird
:bird: :zap: Bluebird is a full featured promise library with unmatched performance. -
Javascript State Machine
A javascript finite state machine library -
when
A solid, fast Promises/A+ and when() implementation, plus other async goodies. -
step
An async control-flow library that makes stepping through logic easy. -
contra
:surfer: Asynchronous flow control with a functional taste to it -
angular-async-loader
Load modules and components asynchronously for angular 1.x application. -
sporadic
Composable Concurrency Abstractions for JavaScript. :railway_track: :rhinoceros: :train: :vertical_traffic_light: -
ObjectEventTarget
A same behaviour EventTarget prototype, that can work with any object from JavaScript
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of modern-async or a related project?
README
modern-async 
A modern JavaScript tooling library for asynchronous operations using async/await and promises.
This library is a modernized alternative to a lot of libraries like Async.js that were created using the legacy callback style to handle asynchronous operations. Its goal is to be as complete as any of those libraries while being built from the very beginning with async/await and promises in mind.
- Exclusively uses async/await and promises in its code, tests and documentation.
- Has low bundle size.
- Has 100% code coverage.
- Bundled for ESM modules, CommonJS and UMD.
- Works in node >= 8.0 and in the vast majority of browsers (very old browser compatibility can be achieved using Babel and shims).
This project accepts feature requests !
The goal of modern-async is to be as complete as possible. I coded everything I missed in the past while developing, yet it's difficult to know what other people would really need. So if you would like some more feature the issue tracker is available. (Read also the contribution guide).
Installation
npm install --save modern-async
Or use jsDelivr to get the UMD version. The content of the library will be available under the modernAsync
global variable.
Usage
import { map, asyncRoot, sleep } from 'modern-async'
// or
const { map, asyncRoot, sleep } = require('modern-async')
asyncRoot(async () => {
const array = [1, 2, 3]
const result = await map(array, async (v) => {
await sleep(10)
return v * 2
})
console.log(result)
})
See the documentation for the rest.
Changelog
Contribution Guide
License
*Note that all licence references and agreements mentioned in the modern-async README section above
are relevant to that project's source code only.