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

0.2.1 • Public • Published

banner

Arithmetics for RxJS observables.

Build Status Code Coverage NPM Version License

npm i rxmetics

This is a minimal RxJS library for lazy people. Instead of this:

import { combineLatest, ... } from 'rxjs';
import { map, ... } from 'rxjs/operators';
 
// ...
 
combineLatest(a, b).pipe(map(([a, b]) => a + b))...

You can do this:

import { add } from 'rxmetics';
 
// ...
 
add(a, b)...

Or this:

import { add } from 'rxmetics/pipes';
 
// ...
 
a.pipe(add(b))...

But its not just for numbers (its RxJS arithmetics):

import { and, eq } from 'rxmetics';
 
// ...
 
and(a.pipe(eq(32)), b.pipe(eq('halo')))...
import { rxl } from 'rxmetics';
import { interval } from 'rxjs';
 
// ...
 
rxl`hellow ${interval(1000)}`.subscribe(console.log);
 
// RESULT:
// > hellow
// > hellow 1
// > hellow 2
// > hellow 3
// ...

Check out the docs for more info.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    3
    • latest

Version History

Package Sidebar

Install

npm i rxmetics

Weekly Downloads

4

Version

0.2.1

License

MIT

Unpacked Size

76.9 kB

Total Files

61

Last publish

Collaborators

  • lorean.victor