All Projects â†’ zebulonj â†’ callbag-subscribe

zebulonj / callbag-subscribe

Licence: MIT license
A callbag sink (listener) that connects an Observer a-la RxJS. 👜

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to callbag-subscribe

Callbag Basics
👜 Tiny and fast reactive/iterable programming library
Stars: ✭ 1,619 (+9423.53%)
Mutual labels:  reactive, observables, callbag
Toy Rx
A tiny implementation of RxJS that actually works, for learning
Stars: ✭ 290 (+1605.88%)
Mutual labels:  reactive, rx, observables
Mobx React Form
Reactive MobX Form State Management
Stars: ✭ 1,031 (+5964.71%)
Mutual labels:  reactive, observables
Audio player flutter
🎧 Apple Music / Tidal Audio Player for Flutter
Stars: ✭ 52 (+205.88%)
Mutual labels:  reactive, rx
Karet
Karet is a library that allows you to embed Kefir observables into React VDOM
Stars: ✭ 81 (+376.47%)
Mutual labels:  reactive, observables
Platform
Reactive libraries for Angular
Stars: ✭ 7,020 (+41194.12%)
Mutual labels:  reactive, observables
Sheldon
Type-safe reactive preferences for Android
Stars: ✭ 34 (+100%)
Mutual labels:  reactive, rx
redrock
Typesafe, reactive redux
Stars: ✭ 14 (-17.65%)
Mutual labels:  reactive, rx
Awesome Rxjs
A collection of awesome RxJS resources
Stars: ✭ 314 (+1747.06%)
Mutual labels:  reactive, observables
Rxviz
Rx Visualizer - Animated playground for Rx Observables
Stars: ✭ 1,471 (+8552.94%)
Mutual labels:  reactive, rx
servable
"simple" observable implementation based off RxJS & kefir Docs
Stars: ✭ 14 (-17.65%)
Mutual labels:  reactive, observables
Reaktive
Kotlin multi-platform implementation of Reactive Extensions
Stars: ✭ 760 (+4370.59%)
Mutual labels:  reactive, rx
Combinex
Open source implementation for Apple's Combine
Stars: ✭ 496 (+2817.65%)
Mutual labels:  reactive, rx
Inferno Most Fp Demo
A demo for the ReactJS Tampa Bay meetup showing how to build a React+Redux-like architecture from scratch using Inferno, Most.js, reactive programmning, and various functional programming tools & techniques
Stars: ✭ 45 (+164.71%)
Mutual labels:  reactive, observables
Outwatch
A purely functional and reactive UI framework
Stars: ✭ 376 (+2111.76%)
Mutual labels:  reactive, rx
Android Okgraphql
Reactive GraphQl client for Android
Stars: ✭ 64 (+276.47%)
Mutual labels:  reactive, rx
Aesthetic
[DEPRECATED]
Stars: ✭ 2,044 (+11923.53%)
Mutual labels:  reactive, rx
Rxgps
Finding current location cannot be easier on Android !
Stars: ✭ 307 (+1705.88%)
Mutual labels:  reactive, rx
Rx Connect
Glue your state and pure React components with RxJS
Stars: ✭ 86 (+405.88%)
Mutual labels:  reactive, rx
Qactive
Reactive queryable observable framework.
Stars: ✭ 147 (+764.71%)
Mutual labels:  reactive, rx

callbag-subscribe 👜

CircleCI npm npm

A callbag sink (listener) that connects an Observer a-la RxJS.

npm install callbag-subscribe

Usage:

Simple (next only)

import pipe from 'callbag-pipe';
import interval from 'callbag-interval';
import subscribe from 'callbag-subscribe';

const source = interval( 10 );

pipe(
  source,
  subscribe( val => console.log( val ) )
);

// 0
// 1
// 2
// 3
// 4
// 5
// 6
// 7
// 8
// 9

Complete observer

import pipe from 'callbag-pipe';
import interval from 'callbag-interval';
import subscribe from 'callbag-subscribe';

const source = interval( 10 );

pipe(
  source,
  subscribe({
    next: val => console.log( val ),
    complete: () => console.log( 'Done!' ),
    error: err => console.error( err )
  })
);

// 0
// 1
// 2
// 3
// 4
// 5
// 6
// 7
// 8
// 9
// Done!

Disposal

Use the returned disposal function to terminate the subscription.

const source = fromEvent( document.body, 'click' );

const dispose = pipe(
  source,
  subscribe({
    next: ev => console.log( 'Click:', ev )
  })
);

// Do some stuff...

dispose(); // Terminate the subscription.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].