# most-proxy

> Circular Dependencies for most.js

Latest version **3.3.0** (published 2017-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install most-proxy
pnpm add most-proxy
yarn add most-proxy
bun add most-proxy
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2017-02-21 |
| First published | 2016-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Tylor Steinberger |
| Maintainers | axefrog, brandonpayton, tylors |
| Keywords | most.js, proxy, circular, dependencies |

## Links

- npm: https://www.npmjs.com/package/most-proxy
- Repository: https://github.com/mostjs-community/most-proxy
- Homepage: https://github.com/mostjs-community/most-proxy#readme
- Issues: https://github.com/mostjs-community/most-proxy/issues
- npm.io page: https://npm.io/package/most-proxy

## Dependencies (2)

- [most](https://npm.io/package/most.md) ^1.1.0
- [@most/multicast](https://npm.io/package/@most/multicast.md) ^1.2.4

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 3.3.0 (latest) — 2017-02-21
- 3.2.0 — 2016-11-12
- 3.1.1 — 2016-08-08
- 3.1.0 — 2016-08-08
- 3.0.0 — 2016-05-29
- 2.0.1 — 2016-04-01
- 2.0.0 — 2016-04-01

## README

# Most Proxy

Create circular stream dependencies that is declarative and designed to avoid
memory leaks.

This codebase is proudly written in TypeScript so you can enjoy beautiful typings.

## Install
```shell
npm install --save most-proxy
```

## Example

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

// create a proxy
// returns *attach* to attach proxy to another stream, and a proxy stream *stream*
const { attach, stream } = proxy()

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

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

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

## API Documentation

```TypeScript
interface Proxy<T> {
  attach(stream: Stream<T>): Stream<T>;

  stream: Stream<T>;
}
```

---
_Source: https://npm.io/package/most-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
