rx-traverse
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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

Package Sidebar

Install

npm i rx-traverse

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

7.68 kB

Total Files

6

Last publish

Collaborators

  • dariom