3.2.5 • Published 6 months ago

async v3.2.5

Weekly downloads
40,962,871
License
MIT
Repository
github
Last release
6 months ago

Async Logo

Github Actions CI status NPM version Coverage Status Join the chat at https://gitter.im/caolan/async jsDelivr Hits

Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with Node.js and installable via npm i async, it can also be used directly in the browser. A ESM/MJS version is included in the main async package that should automatically be used with compatible bundlers such as Webpack and Rollup.

A pure ESM version of Async is available as async-es.

For Documentation, visit https://caolan.github.io/async/

For Async v1.5.x documentation, go HERE

// for use with Node-style callbacks...
var async = require("async");

var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
var configs = {};

async.forEachOf(obj, (value, key, callback) => {
    fs.readFile(__dirname + value, "utf8", (err, data) => {
        if (err) return callback(err);
        try {
            configs[key] = JSON.parse(data);
        } catch (e) {
            return callback(e);
        }
        callback();
    });
}, err => {
    if (err) console.error(err.message);
    // configs is now a map of JSON data
    doSomethingWith(configs);
});
var async = require("async");

// ...or ES2017 async functions
async.mapLimit(urls, 5, async function(url) {
    const response = await fetch(url)
    return response.body
}, (err, results) => {
    if (err) throw err
    // results is now an array of the response bodies
    console.log(results)
})
portfinderwinstonarchivergetosjakeistanbul-apivk-libvue-template-generatexmi-docgenxlcoreservice@alexghi/reiconsfixativecuc-gaf@hd-ui/cli@microsoft/teamsfx-cli@qiibee/qb-api@tyz-wallet/tyz-wallet-core-client@tyz-wallet/tyz-wallet-core-service@tyz-wallet/tyz-wallet-core-wallet-client@rockolin/git-pull-code@fasum/stockjs@essent/lerna@homeboxio/dredd@hn-ui/cliag-brokerargo-tradingarchetype-libraryawesome9-wp-pluginawescode-testcafe@directus-asolole/api@goodware/winston-cloudwatch@haad/ipfsd-ctlchecks-files-jsdev-wdev-nodered-crudwerpcolor-fonts-gradientscomponennenttcomplydapiddapid-registry-ethereum-contract@apeiromont/viber-bot@mdn/yari@ledgerhq/live-common@publicapps/client-demo-template@inc/restify-mongooseeasy-select-rn@iamjoeker/swaggerize-expressnoob111wpsuite@thebespokepixel/guppy-clivuedragdropuploadimagesdripple-initnodebb-plugin-sso-steam-v2-definitive@argon-framework/coregeotab-data-service@inevix/grunt-webfontambients-serverbt-mysql-managersaidbekakagalatest-commit-loggercreateviewreact-native-bluetooth2killi8n-react-native-fast-imagespike-pdf-toolxuirecorderplus@leapit/analysisfns-gmsmarthoppernodedowork@nia3208/forevertargeting-helperhetatestnode_mongo_expressofficegen-plusschriftlage-clinode-comment@stefancfuchs/apolar-webcrawler@stefancfuchs/firefly-chatbotelaah-api@ventinc/jitsi-apirascal-electronpolispay-wallet-clientgamiphyparcel-boiler-es6nodebb-plugin-sso-oauth-supcomhubplaysip-carromsqin_ze_huavpn-speed-teststudent-log@darrinholst/dynalite@itemsjs/config@itemsjs/http-server@~simple/clipeopleapiclisandbox-js-frameworkmock-amdocslooneyjsloopsailorharbbor-js@paintzen/paymentplayship-utils
3.2.5

6 months ago

3.2.4

2 years ago

2.6.4

2 years ago

3.2.3

2 years ago

3.2.2

2 years ago

3.2.1

3 years ago

3.2.0

4 years ago

3.1.1

4 years ago

2.6.3

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.6.2

5 years ago

3.0.1-0

6 years ago

2.6.1

6 years ago

2.6.0

6 years ago

2.5.0

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

2.0.0-rc.6

8 years ago

2.0.0-rc.5

8 years ago

2.0.0-rc.4

8 years ago

2.0.0-rc.3

8 years ago

2.0.0-rc.2

8 years ago

2.0.0-rc.1

8 years ago

2.0.0-alpha.0

8 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

9 years ago

1.4.2

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.1

9 years ago

1.1.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.9.2

9 years ago

0.9.0

10 years ago

0.8.0

10 years ago

0.7.0

10 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.10

10 years ago

0.2.9

11 years ago

0.2.8

11 years ago

0.2.7

11 years ago

0.2.6

11 years ago

0.2.5

11 years ago

0.2.4

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.23

12 years ago

0.1.22

12 years ago

0.1.21

12 years ago

0.1.20

12 years ago

0.1.19

12 years ago

0.1.18

12 years ago

0.1.17

12 years ago

0.1.16

12 years ago

0.1.15

12 years ago

0.1.14

12 years ago

0.1.13

12 years ago

0.1.12

13 years ago

0.1.11

13 years ago

0.1.10

13 years ago

0.1.9

13 years ago

0.1.8

13 years ago

0.1.7

13 years ago

0.1.6

13 years ago

0.1.5

13 years ago

0.1.4

13 years ago

0.1.3

13 years ago

0.1.2

13 years ago

0.1.1

13 years ago

0.1.0

13 years ago