caolan/async

JavaScriptcaolan.github.io/async/

Async utilities for node and the browser

javascriptasynccallbacks
스타 성장
스타
28.1k
포크
2.4k
주간 성장
+-6
이슈
9
10k20k
2011년 2월2016년 4월2021년 6월2026년 9월
아티팩트npm
README

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. An 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)
})
관련 저장소
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

TypeScriptnpmtutorialBSD 3-Clause "New" or "Revised" Licenselearn-to-codenonprofits
contribute.freecodecamp.org
455.2k46.2k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPItutorialMIT Licensetutorialproject
282.7k36.2k
react/react

The library for web and native user interfaces.

JavaScriptnpmlibraryMIT Licensejavascriptreact
react.dev
249.7k51.3k
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

TypeScriptnpmlibraryMIT Licensevuejavascript
v2.vuejs.org
212.1k33.7k
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

JavaScriptnpminterviewMIT Licensejavascriptalgorithms
196.7k31k
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

tutorialOtherbook-seriesjavascript
amazon.com/dp/B085XXCJ7X
184.8k33.4k
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

MDXMIT Licensecssbootstrap
getbootstrap.com
174.8k78.6k
airbnb/javascript

JavaScript Style Guide

JavaScriptnpmlibraryMIT Licensejavascripteslint
148.2k26.6k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmawesomeCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
129k12.5k
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

C++appMIT Licenseelectronjavascript
electronjs.org
123k17.5k
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

JavaScriptnpmOthernodejsjavascript
nodejs.org
121.2k36.7k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

awesomeGNU General Public License v3.0pythonjavascript
weibo.com/justjavac
118.8k28.3k