Skip to content

dario1985/rx-traverse

Repository files navigation

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

About

A Reactive Traverse implementation with TS types

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published