You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rx-math

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-math

Reactive Math

1.1.4
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Reactive Math

Dependencies Status devDependency Status npm GitHub license Build Status

Helpers to write functional reactive calculators.

Installation

npm install --save rx-math

Basic Usage

This is an oversimplification of how one would actually use RxMath. In reality, the source Observables will come from a form input, data service, or perhaps even another RxMath calculation. It's likely that you'll also want to create a class to encapsulate a more complex calculation.

let x: Observable<number> = Observable.of(123);
let y: Observable<number> = Observable.of(456);

let average: Observable<number> = RxMath.average(x, y);

average.subscribe((val: number) => {
	console.log('Average is', val);
});

// outputs "Average is 289.5"

Keywords

reactive

FAQs

Package last updated on 30 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts