FutoIn AsyncSteps mimics traditional threads of execution in a single-threaded event loop, supporting cancellation, exit handlers, thread-local storage, and synchronization primitives like mutexes and throttles. Current stable version is 2.5.6, released under a stable maturity (status 3). It builds on the FTN12: FutoIn Async API v1.13 specification. Key differentiators include explicit step-based control flow (add, parallel, error handling) rather than Promises or async/await, though it integrates with Promises via as.await(). It is designed for both Node.js (>=8) and browser environments, providing ES5 CJS modules under es5/ and pre-built webpack dists under dist/. Synchronization primitives like Mutex are available for coordinated concurrent execution.
npm install futoin-asyncstepsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic step execution chain with add() and success().
Ensure exactly one call to as.success() or as.error() per step (or none for implicit success).
Include dist/polyfill-asyncsteps.js before using Sync primitives in legacy browsers.
Use as.state for cross-step data, but be aware of unintended sharing when passing AsyncSteps instances or creating nested scopes.
Ensure error handling steps are added after as.await() to catch rejections.
Assign to as.state inside each parallel add() callback to collect outputs.
Use `import $as from 'futoin-asyncsteps'` or `const $as = require('futoin-asyncsteps')`.Run `npm install futoin-asyncsteps` and ensure import path is correct.
Only call as.success() inside a step function passed to add(), parallel().add(), etc.
No dependency data recorded yet.