IxJS, currently stable at version 7.0.0, is a JavaScript library providing the "Interactive Extensions" for composing synchronous and asynchronous pull-based collections. It extends the familiar Array#extras style (like map, filter, reduce) to native JavaScript `Iterable` and `AsyncIterable` objects, as well as generators and async generators. Unlike push-based reactive libraries such as RxJS, IxJS focuses on consumer-driven data flow, making it particularly well-suited for I/O operations where data is pulled when ready. The library offers distinct modules for synchronous (`ix/iterable`) and asynchronous (`ix/asynciterable`) operations, supporting both pipeable operators and a prototype-extension approach for bundling flexibility. It ships with full TypeScript type definitions and maintains a steady release cadence, typically with minor versions for features and bug fixes, with major versions addressing internal changes or deeper refactorings.
npm install ixVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating a synchronous `Iterable` from a generator function and transforming it using pipeable `filter` and `map` operators, then iterating through the results.
Always ensure you are importing from either `ix/iterable` for sync operations or `ix/asynciterable` for async operations, and their respective `operators` submodules.
Thoroughly test your application when upgrading major versions. Refer to the GitHub release notes and commit history for subtle behavioral changes or type definition improvements.
Prefer using pipeable operators by importing them directly (e.g., `import { map } from 'ix/iterable/operators';`) and composing them with the `.pipe()` method on your iterable instances. This enables better tree-shaking and avoids global prototype modifications.Ensure the operator is imported from `ix/iterable/operators` (or `ix/asynciterable/operators`) and used with the `.pipe()` method, or that the corresponding `ix/add/...` module has been imported for prototype extension.
Verify that your data source is truly asynchronous (e.g., an `AsyncGenerator`, `Promise` of an `Iterable`) and that you are consistently using imports from `ix/asynciterable` and `ix/asynciterable/operators`.
Always use specific import paths for creators and operators, such as `import { from } from 'ix/iterable';` or `import { map } from 'ix/asynciterable/operators';`.No dependency data recorded yet.