How caolan/async works
Async is a JavaScript utility library for composing asynchronous work with callbacks or Promises. A consumer calls an exported utility; collection operations apply iteratees, while control-flow utilities coordinate dependent or ordered tasks and queue utilities manage scheduled work. The README documents callback and async-function usage, and the source excerpts show collection iteration, dependency scheduling, and queue internals. Other major API families are represented from the public index and repository tree; their internal call relationships are not inferred where source was not sampled.
Main entry points: index.js Utility exports · queue.js Queue engine · eachOf.js Keyed iteration · map.js Map operations
Components 21
Public API
- Utility exports
lib/index.js
Collection operations
- Keyed iteration
lib/eachOf.js - Limited iteration
lib/eachOfLimit.js - Series iteration
lib/eachOfSeries.js - Map operations
lib/map.js - Collection families
lib
Control flow
- Dependency scheduler
lib/auto.js - Dependency injection
lib/autoInject.js - Sequence utilities
lib - Retry utilities
lib/retry.js
Task queues
- Queue APIs
lib/queue.js - Cargo queues
lib/cargo.js - Cargo queue variant
lib/cargoQueue.js - Queue engine
lib/internal/queue.js
Runtime support
- Async adapter
lib/asyncify.js - Async detection
lib/internal/wrapAsync.js - Promise adapter
lib/internal/awaitify.js - Callback guards
lib/internal/onlyOnce.js - Deferred scheduler
lib/internal/setImmediate.js - Task list
lib/internal/DoublyLinkedList.js
Other components
- Library consumer
Connections 20
- Library consumer → Utility exports: calls
README.md - Utility exports → Keyed iteration: exports
lib/index.js - Utility exports → Map operations: exports
lib/index.js - Utility exports → Dependency scheduler: exports
lib/index.js - Utility exports → Dependency injection: exports
lib/index.js - Utility exports → Queue APIs: exports
lib/index.js - Keyed iteration → Limited iteration: delegates to
lib/eachOf.js - Series iteration → Limited iteration: delegates to
lib/eachOfSeries.js - Map operations → Keyed iteration: iterates with
lib/map.js - Dependency injection → Dependency scheduler: runs via
lib/autoInject.js - Queue APIs → Queue engine: creates
lib/queue.js - Cargo queues → Queue engine: uses
lib/cargo.js - Cargo queue variant → Queue engine: uses
lib/cargoQueue.js - Queue engine → Async detection: wraps worker
lib/internal/queue.js - Queue engine → Deferred scheduler: schedules processing
lib/internal/queue.js - Queue engine → Task list: stores tasks
lib/internal/queue.js - Async detection → Async adapter: adapts async
lib/internal/wrapAsync.js - Map operations → Promise adapter: supports promises
lib/map.js - Keyed iteration → Callback guards: guards callbacks
lib/eachOf.js - Dependency scheduler → Async detection: wraps tasks
lib/auto.js