@typed/stream
v1.1.0
Published
Typed-extensions to @most/core
Downloads
5
Readme
@typed/stream
Well-typed extensions to @most/core
Get it
yarn add @typed/stream
# or
npm install --save @typed/stream
API
filterMaybe<A>(maybe$: Stream<Maybe<A>>): Stream<A>
Filters out the Nothing
values a stream of Maybe
s and unwraps the
values of all Just
s.
maybe$: ---N---J(1)---N---J(1)---->
filterMaybe(maybe$):---------1----------1----->
splitEither<A, B>(either$: Stream<Either<A, B>>): [ Stream<A>, Stream<B> ]
Splits the values contained in an Either
and produces 1 stream for the Left
and 1 stream Right
values.
either$: ---L(1)---R(2)---L(3)---R(4)--->
const [ left$, right$ ] = splitEither(either$)
left$: -----1-------------3----------->
right$: ------------2-------------4---->