JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 36
  • Score
    100M100P100Q60581F
  • License MIT

Package Exports

  • most-proxy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (most-proxy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Most Proxy

Simple way to create circular dependencies without the use of subjects.

Install

$ npm install --save most-proxy

API Documentation

Documentation can be found here

Example

import {periodic} from 'most'
import {proxy} from 'most-proxy'

// create a proxy
// returns fn to attach proxy to another stream, and a proxy stream
const [attach, actionProxy$] = proxy()

// observe the proxy, taking only three events
// proxy is a real most.Stream
// when actionProxy$ ends, original will also be disposed of internally
actionProxy$.take(3).observe(x => console.log(x)) // 1, 2, 3

// here we create the stream we want to use as the circular dep
const original = peridioc(100).scan((x, y) => x + y, 0)

// pipe events from original to proxy stream
attach(original)