Thanks to visit codestin.com
Credit goes to github.com

Skip to content

streamich/rx-use

Repository files navigation

rx-use

Sensor and side-effect library for rxjs. Do you want to contribute? See, help wanted.

Observables

  • location$ — browser location and history sensor.
    • pathname$ — browser location pathname sensor.
  • network$ — returns consolidate network status info.
    • onLine$boolean whether user is on-line.
    • connection$ — information about user's network connection.
  • windowSize$ and windowSizeRaf$ — browser window dimension sensor.
  • darkTheme$ — emits true if UI should use dark theme.
  • matchMedia$() — returns boolean indicating media query match.
  • stdin$ — listen for data coming from STDIN.
  • ansiKeys$ — listen for ANSI terminal key presses.

Operators

  • raf() — de-bounces events using window.requestAnimationFrame.

Other

  • fromStream() — constructs observable from Node.js readable stream.

Most observables imported from this library have ReadonlyBehaviorSubject type. Which is an Observable with an extra .getValue() to access the current value of the observable.

type ReadonlyBehaviorSubject<T> = Observable<T> & Pick<BehaviorSubject<T>, 'getValue'>;

License

Unlicense — public domain.

About

RxJS DOM sensors

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •