# it-pushable

> An iterable that you can push values into

Latest version **3.2.4** (published 2026-05-08) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install it-pushable
pnpm add it-pushable
yarn add it-pushable
bun add it-pushable
```

## Health

**Score 65/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.2.4 |
| Published | 2026-05-08 |
| First published | 2019-04-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 66.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 15 |
| Author | Alan Shaw |
| Maintainers | achingbrain, alanshaw |
| Keywords | iterable, iterator, push, pushable |

## Links

- npm: https://www.npmjs.com/package/it-pushable
- Repository: https://github.com/alanshaw/it-pushable
- Homepage: https://github.com/alanshaw/it-pushable#readme
- Issues: https://github.com/alanshaw/it-pushable/issues
- npm.io page: https://npm.io/package/it-pushable

## Dependencies (1)

- [p-defer](https://npm.io/package/p-defer.md) ^4.0.0

## Recent versions

- 3.2.4 (latest) — 2026-05-08
- 3.2.3 — 2023-11-16
- 3.2.2 — 2023-11-11
- 3.2.1 — 2023-07-04
- 3.2.0 — 2023-07-03
- 3.1.4 — 2023-06-30
- 3.1.3 — 2023-04-18
- 3.1.2 — 2022-12-16
- 3.1.1 — 2022-12-16
- 3.1.0 — 2022-08-02
- 3.0.0 — 2022-06-10
- 2.0.2 — 2022-06-08
- 2.0.1 — 2022-01-13
- 2.0.0 — 2022-01-13
- 1.4.2 — 2021-02-07
- … 10 more at https://npm.io/package/it-pushable/versions

## README

# it-pushable <!-- omit in toc -->

[![codecov](https://img.shields.io/codecov/c/github/alanshaw/it-pushable.svg?style=flat-square)](https://codecov.io/gh/alanshaw/it-pushable)
[![CI](https://img.shields.io/github/actions/workflow/status/alanshaw/it-pushable/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/alanshaw/it-pushable/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> An iterable that you can push values into

# About

<!--

!IMPORTANT!

Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.

To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts

To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.

-->

An iterable that you can push values into.

## Example

```js
import { pushable } from 'it-pushable'

const source = pushable()

setTimeout(() => source.push('hello'), 100)
setTimeout(() => source.push('world'), 200)
setTimeout(() => source.end(), 300)

const start = Date.now()

for await (const value of source) {
  console.log(`got "${value}" after ${Date.now() - start}ms`)
}
console.log(`done after ${Date.now() - start}ms`)

// Output:
// got "hello" after 105ms
// got "world" after 207ms
// done after 309ms
```

## Example

```js
import { pushableV } from 'it-pushable'
import all from 'it-all'

const source = pushableV()

source.push(1)
source.push(2)
source.push(3)
source.end()

console.info(await all(source))

// Output:
// [ [1, 2, 3] ]
```

## Table of contents <!-- omit in toc -->

- [Install](#install)
  - [Browser `<script>` tag](#browser-script-tag)
- [Usage](#usage)
- [Related](#related)
- [API Docs](#api-docs)
- [License](#license)
- [Contribution](#contribution)

## Install

```console
$ npm i it-pushable
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `ItPushable` in the global namespace.

```html
<script src="https://unpkg.com/it-pushable/dist/index.min.js"></script>
```

## Usage

```js
import { pushable } from 'it-pushable'

const source = pushable()

setTimeout(() => source.push('hello'), 100)
setTimeout(() => source.push('world'), 200)
setTimeout(() => source.end(), 300)

const start = Date.now()

for await (const value of source) {
  console.log(`got "${value}" after ${Date.now() - start}ms`)
}
console.log(`done after ${Date.now() - start}ms`)

/*
Output:
got "hello" after 105ms
got "world" after 207ms
done after 309ms
*/
```

```js
import { pushableV } from 'it-pushable'
import all from 'it-all'

const source = pushableV()

source.push(1)
source.push(2)
source.push(3)
source.end()

console.info(await all(source))
/*
Output:
[ [1, 2, 3] ]
*/
```

## Related

- [`it-pipe`](https://www.npmjs.com/package/it-pipe) Utility to "pipe" async iterables together

## API Docs

- <https://alanshaw.github.io/it-pushable>

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

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