This package provides utility functions like `forEach`, `map`, and `filter` for a specific, custom, callback-based asynchronous iterator pattern. In this library's context, an async iterator is defined as an object with a `next(cb)` method, where `cb` is a `function(err, value)` callback. The `next` method should return the next item from an underlying data source, calling `cb(null, undefined)` when no more data is available. Published in 2013, its current and only stable version is 0.2.2. The library targets legacy Node.js versions (>=0.10) and significantly predates the native ECMAScript `Symbol.asyncIterator` and `for-await-of` syntax, which were standardized in ES2018 and natively supported in Node.js 10.x. As it has seen no updates in over a decade, it is considered abandoned and fundamentally incompatible with modern asynchronous programming paradigms without extensive re-engineering or wrappers.
npm install async-iteratorsVerified import paths — ran on the pinned version, not inferred.
Demonstrates the use of `forEach` with a custom callback-based async iterator, logging each item and an 'end' message.
Migrate to native async iterators and modern async/await patterns, or use a contemporary library that provides similar utilities for `AsyncIterable`.
Avoid using this package in modern Node.js projects. Consider `data-async-iterators` or `buffered-async-iterable` for modern async iterable utilities.
In an ESM project, you would need to use `const iterators = require('async-iterators')` within a CommonJS wrapper, or refactor to use a modern ESM-compatible async utility library.Ensure you are using CommonJS `require` syntax: `const iterators = require('async-iterators');`.This package is not compatible with ES module projects. You must either convert your project to CommonJS or choose a modern async iterator library that supports ES modules.
No dependency data recorded yet.