rx-traverse
v0.2.0
Published
A Reactive Traverse implementation with TS types
Downloads
4
Readme
rx-traverse
Reactive (RxJs 6) traverse library
Features | Installation | Usage
Features
RxJs style: the library returns an
Observable
object and supportsrxjs/operators
.Stop/Skip traverse: is possible to cancel (stop) or stop over (skip) a specific branch.
Custom traverse: is possible to use a custom traverse logic.
ES2017 targeted: to be safely used with Node engines >=8 LTS
Circular references detected to avoid infinite iterations (you can scrub them by filtering).
Typescript support
Installation
# Using NPM
$ npm install rx-traverse
# Using Yarn
$ yarn add rx-traverse
Usage
traverse([1, 2, 3])
.pipe(
skip(1),
map(x => x.state.value),
toArray())
.subscribe(console.log);
// Returns:
// [1, 2, 3]