{"id":13410741,"url":"https://github.com/caolan/async","last_synced_at":"2025-09-09T21:08:29.870Z","repository":{"id":928857,"uuid":"698041","full_name":"caolan/async","owner":"caolan","description":"Async utilities for node and the browser","archived":false,"fork":false,"pushed_at":"2025-05-01T15:14:00.000Z","size":7883,"stargazers_count":28236,"open_issues_count":13,"forks_count":2403,"subscribers_count":652,"default_branch":"master","last_synced_at":"2025-05-04T19:11:17.267Z","etag":null,"topics":["async","callbacks","javascript"],"latest_commit_sha":null,"homepage":"http://caolan.github.io/async/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caolan.png","metadata":{"files":{"readme":"README.es.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/aliases.txt","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-06-01T21:01:30.000Z","updated_at":"2025-05-04T15:14:17.000Z","dependencies_parsed_at":"2023-07-05T15:16:48.860Z","dependency_job_id":"e3aa589c-c070-4633-8bdb-3f9f62f80516","html_url":"https://github.com/caolan/async","commit_stats":{"total_commits":1584,"total_committers":269,"mean_commits":5.888475836431227,"dds":0.7342171717171717,"last_synced_commit":"f668b0d72161bd3b225654360282299800b00be4"},"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolan%2Fasync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolan%2Fasync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolan%2Fasync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caolan%2Fasync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caolan","download_url":"https://codeload.github.com/caolan/async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252405803,"owners_count":21742680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","callbacks","javascript"],"created_at":"2024-07-30T20:01:08.817Z","updated_at":"2025-05-05T12:24:58.850Z","avatar_url":"https://github.com/caolan.png","language":"JavaScript","readme":"![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg)\n\n![Github Actions CI status](https://github.com/caolan/async/actions/workflows/ci.yml/badge.svg)\n[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async)\n[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)\n[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async)\n\n\nAsync is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm install --save async`, it can also be used directly in the browser.\n\nThis version of the package is optimized for building with webpack. If you use Async in Node.js, install [`async`](https://www.npmjs.com/package/async) instead.\n\nFor Documentation, visit \u003chttps://caolan.github.io/async/\u003e\n\n*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*\n\n\n```javascript\n// for use with callbacks...\nimport { forEachOf } from \"async-es\";\n\nconst images = {cat: \"/cat.png\", dog: \"/dog.png\", duck: \"/duck.png\"};\nconst sizes = {};\n\nforEachOf(images, (value, key, callback) =\u003e {\n    const imageElem = new Image();\n    imageElem.src = value;\n    imageElem.addEventListener(\"load\", () =\u003e {\n        sizes[key] = {\n            width: imageElem.naturalWidth,\n            height: imageElem.naturalHeight,\n        };\n        callback();\n    });\n    imageElem.addEventListener(\"error\", (e) =\u003e {\n        callback(e);\n    });\n}, err =\u003e {\n    if (err) console.error(err.message);\n    // `sizes` is now a map of image sizes\n    doSomethingWith(sizes);\n});\n```\n\n```javascript\nimport { mapLimit } from \"async-es\";\n\n// ...or ES2017 async functions\nmapLimit(urls, 5, async function(url) {\n    const response = await fetch(url)\n    return response.body\n}, (err, results) =\u003e {\n    if (err) throw err\n    // results is now an array of the response bodies\n    console.log(results)\n})\n```\n","funding_links":[],"categories":["Uncategorized","JavaScript","Packages","Repository","Javascript","包","目录","Control Flow","js库(Browser/Nodejs)","前端开发框架及项目","Control Flow [🔝](#readme)","Control flow","38. 实用工具/其他插件 ##","Libraries","控制流","javascript","41. 实用工具/其他插件","Node.js","Node"],"sub_categories":["Uncategorized","Control flow","流程控制","测试/工具/Mock","Runner","其他_文本生成、文本对话","React Components","13.20 视差滚动(Parallax Scrolling) ###","[Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)","Control flow Callbacks","运行器","24.3 Web Sockets","常用NPM工具模块","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaolan%2Fasync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaolan%2Fasync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaolan%2Fasync/lists"}