# publishable-iterator

> A javascript publishable async iterator lib

Latest version **1.0.3** (published 2021-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install publishable-iterator
pnpm add publishable-iterator
yarn add publishable-iterator
bun add publishable-iterator
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-04-22 |
| First published | 2021-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | boschdev |
| Keywords | async, iterator, publishable |

## Links

- npm: https://www.npmjs.com/package/publishable-iterator
- Repository: https://github.com/boschDev/publishable-iterator
- Homepage: https://github.com/boschDev/publishable-iterator#readme
- Issues: https://github.com/boschDev/publishable-iterator/issues
- npm.io page: https://npm.io/package/publishable-iterator

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-04-22
- 1.0.2 — 2021-03-24
- 1.0.1 — 2021-03-23

## README

# publishable-iterator

A javascript publishable async iterator lib

## Install

```shell
npm install --save publishable-iterator
```

## How to use

```javascript
import PublishableIterator from 'publishable-iterator'

const iterator = new PublishableIterator()

// Iterate over the PublishableIterator
for await (const item of iterator) {
  console.log(item)
}

// This will give all the active iterators a new value
iterator.publish('Hi there')

// This will give all the active iterators a new value
iterator.publish('Stop all the current itterators', true)
```

You can also pass an iterated type in Typescript.

```typescript
interface Foo {
  bar: string
}

const iterator = new PublishableIterator<Foo>()
```

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