Reactive (RxJs 6) traverse library
Features | Installation | Usage
-
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
# Using NPM
$ npm install rx-traverse
# Using Yarn
$ yarn add rx-traverse
traverse([1, 2, 3])
.pipe(
skip(1),
map(x => x.state.value),
toArray())
.subscribe(console.log);
// Returns:
// [1, 2, 3]