0.2.0 • Published 4 years ago

rx-traverse v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

rx-traverse

NPM version Downloads

Reactive (RxJs 6) traverse library

Features | Installation | Usage

Features

  • RxJs style: the library returns an Observable object and supports rxjs/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]

License

MIT