Bot releases are hidden (Show)
Published by trxcllnt about 2 years ago
Published by trxcllnt about 3 years ago
Published by trxcllnt over 3 years ago
Published by trxcllnt over 3 years ago
Published by trxcllnt over 3 years ago
Published by trxcllnt about 4 years ago
Abort: Add basic abortsignal support (a66a7c8)
Abort: Add basic abortsignal support (07ba58c)
Abort: Add more aborts (b7832a6)
Abort: add more throws if aborted (2a489e1)
Abort: fix debounce (954ce58)
Abort: Fix most operators (08a4c08)
Abort: fix reduce (6e848f1)
Abort: Formatting (d9e75ef)
Abort: Update all JSDocs (313a1b4)
asasynciterable: add AsyncIterableTransform stream (e3d12a1)
min/max: Fix min and max (37e7c0a)
never: Adds never (64a9c31)
Adding converting docs and links (6c493ae)
Updating through withLatestFrom (79be89c)
Adding docs through map (cf6a509)
Published by trxcllnt over 4 years ago
Published by trxcllnt over 4 years ago
Published by mattpodwysocki over 4 years ago
At long last, IxJS v3.0 is here! There are a lot of changes with this release to be more in line with RxJS 6+ with piped operators. We have still kept the "add to prototype" methods as well which can be used to augment operators directly onto the AsyncIterable
and Iterable
objects.
Much like RxJS, IxJS operators can now be imported using the following for AsyncIterable
. The same applies to Iterable
much as we are doing with AsyncIterable
down below.
import { from } from 'ix/asynciterable';
import { map, filter } from 'ix/asynciterable/operators';
async function* getData() {
yield 1;
yield 2;
yield 3;
}
const results = from(getData()).pipe(
map(async (item, index) => item * index),
filter(async (item, index) => index % 2 === 0)
);
for await (let result of results) {
console.log(`Next ${result}`);
}
Much like earlier versions of IxJS and RxJS, you can still add onto the prototype for chaining purposes.
import { AsyncIterableX as AsyncIterable } from 'ix/asynciterable';
import 'ix/add/asynciterable/from';
import 'ix/add/asynciterable-operators/map';
import 'ix/add/asynciterable-operators/filter';
async function* getData() {
yield 1;
yield 2;
yield 3;
}
const results = Iterable.from(getData())
.map(async (item, index) => item * index)
.filter(async (item, index) => index % 2 === 0);
for await (let result of results) {
console.log(`Next ${result}`);
}
The forEach
operator is already added just in case you wanted to use lambdas all the way through such as the following which has also as a catch
method as the result from .forEach
is a promise.
const results = Iterable.from(getData())
.map(async (item, index) => item * index)
.filter(async (item, index) => index % 2 === 0)
.forEach(result => console.log(`Next ${result}`))
.catch(err => console.log(`Error ${err}`));
Published by trxcllnt over 5 years ago
The IxJS v2.5.3 release is now available. This updates the following:
Iterator
support for the from
method for both AsyncIterable
and Iterable
tap
to support tap(nextCb, errorCb, doneCb)
in addition to tap(observer)
Iterable#pipe(writable)
, Iterable#toDOMStream()
, Iterable#pipeTo/pipeThrough/tee
to match AsyncIterable
PartialObserver
and finally
to return any
instead of void
combineLatest
and zip
to handle zero length argumentsmemoize
and adds additional testsPublished by trxcllnt over 5 years ago
Published by trxcllnt almost 6 years ago
Published by trxcllnt almost 6 years ago