• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A modern JavaScript tooling library for asynchronous operations using async/await, promises and async generators

modern-async Tweet

logo

GitHub Repo stars Website Node.js CI npm Coverage Status

A modern JavaScript tooling library for asynchronous operations using async/await, promises and async generators.

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.

See the documentation.

  • Exclusively uses async/await, promises and async generators 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 and in the vast majority of browsers (very old browser compatibility can be achieved using Babel and shims).
  • Has Typescript support.

Stargazers repo roster for @nicolas-van/modern-async

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, sleep } from 'modern-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

The changelog.

Contribution Guide

The contribution guide

License

The license.

More Repositories

1

bootstrap-4-github-pages

A Bootstrap 4 template project for Github Pages and Jekyll
SCSS
249
star
2

sonant-x

Small JavaScript synthesizer library
JavaScript
233
star
3

ring.js

Ring.js - JavaScript Class System with Multiple Inheritance
JavaScript
221
star
4

multirun

A minimalist init process designed for Docker
C
171
star
5

pygreen

A micro web framework/static web site generator.
Python
167
star
6

easy-markdown-to-github-pages

Convert Markdown files in Github to a full website using Github Pages
103
star
7

sonant-x-live

Tracker web application to compose music in a brower
JavaScript
90
star
8

jiko

Full Featured Template Engine for JavaScript
JavaScript
71
star
9

rust-cross-compile-example

A working example of multi targets compilation for Rust using Github Actions. Supports Windows, MacOSX, x86_64, ARM and Raspberry PI Linux.
Rust
58
star
10

wordpress-simple-bootstrap

A clean base theme to use Twitter Boostrap 4 with Wordpress
PHP
57
star
11

steelseries

A collection of gauge components for JavaScript.
JavaScript
29
star
12

docker-compose-wait

Some useful script to wait until all services declared in a docker-compose file are up and running.
Python
29
star
13

parcel-github-pages-boilerplate

A Parcel boilerplate to deploy on Github Pages using Github Actions.
SCSS
23
star
14

widget.js

A lightweight JavaScript component framework
JavaScript
16
star
15

bisync

A bidirectional folder synchronizer with distributed history.
Python
12
star
16

egm96-universal

A JavaScript library to convert between EGM96-relative altitudes and WGS84 ellipsoid-relative altitudes
Fortran
10
star
17

win-cmd-escaper

A Python library to properly handle escaping of command line arguments in Windows' CMD.exe and Powershell.
Python
9
star
18

lightningmf

Lightning MAME Frontend
Python
9
star
19

mailflash

A simple python library to send emails.
Python
9
star
20

snoweffect

A snow effect made with three.js
JavaScript
8
star
21

nicolas-van.github.io

My personal blog
SCSS
8
star
22

parcel-pwa

A minimalistic PWA made with Parcel
HTML
6
star
23

react-bootstrap-confirmation

A library to easily display alerts and confirmations using React and Bootstrap
JavaScript
6
star
24

install-chrome-dialog

A simple javascript script to display an "install chrome" dialog in old browsers
JavaScript
5
star
25

sw_stats

A Savage Worlds success rate calculator
CSS
4
star
26

github-actions-multiarch-docker-image-build

An example Github Actions configuration to build a Docker image for multiple architectures.
JavaScript
4
star
27

sai-synth

An experimental subtractive synthesizer using the Web Audio API
JavaScript
4
star
28

letsencrypt-renew

A small guide to install letsencrypt certificates with autorenew
Shell
3
star
29

loadingquest

Loading Quest
JavaScript
3
star
30

simple-duration

A JavaScript library to convert seconds to strings and back using a human readable format
JavaScript
3
star
31

ibook-generator

parser to generate interactive books
Python
1
star
32

js-console

A collection of librairies on a web page to make tests using your browser console
HTML
1
star
33

protocms

A starter cms in Python
JavaScript
1
star
34

pi-expander

A small script to turn a Raspberry pi into a MIDI expander
Shell
1
star
35

oxonet

A tic-tac-toe made with Socket.io
CSS
1
star
36

dictionaryjs

DictionaryJS, a javascript library to define dictionaries that can be indexed using any data type.
JavaScript
1
star
37

php-nginx-docker

A php-fpm + nginx combination for both debian and alpine.
PHP
1
star
38

boostcstream

character stream helpers for boost
C++
1
star
39

test-pygame

A test of pygame
Python
1
star
40

nbf

nobrainfuck
Python
1
star
41

3dphotogallery

A 3D photo gallery made with three.js
JavaScript
1
star
42

jsgame

Some test video game in JavaScript
JavaScript
1
star
43

cesium-cartographic

Math helper extensions for cartographic calculation in Cesium.js
JavaScript
1
star