# @ljharb/resumer

> a through stream that starts paused and resumes on the next tick

Latest version **0.1.3** (published 2024-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ljharb/resumer
pnpm add @ljharb/resumer
yarn add @ljharb/resumer
bun add @ljharb/resumer
```

## Health

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

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2024-03-09 |
| First published | 2023-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 2 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | James Halliday |
| Maintainers | ljharb |
| Keywords | through, stream, pause, resume |

## Links

- npm: https://www.npmjs.com/package/@ljharb/resumer
- Repository: https://github.com/ljharb/resumer
- Issues: https://github.com/ljharb/resumer/issues
- npm.io page: https://npm.io/package/@ljharb/resumer

## Dependencies (2)

- [call-bind](https://npm.io/package/call-bind.md) ^1.0.7
- [@ljharb/through](https://npm.io/package/@ljharb/through.md) ^2.3.13

## Recent versions

- 0.1.3 (latest) — 2024-03-09
- 0.1.2 — 2024-01-27
- 0.1.1 — 2024-01-27
- 0.1.0 — 2024-01-26
- 0.0.1 — 2023-07-18

## README

# @ljharb/resumer <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

*Note*: This package is a fork of https://npmjs.com/resumer, and builds off of it.

Return a through stream that starts out paused and resumes on the next tick, unless somebody called `.pause()`.

This module has the same signature as [through](https://npmjs.com/package/through).

[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

# example

``` js
var resumer = require('resumer');
var s = createStream();
s.pipe(process.stdout);

function createStream () {
    var stream = resumer();
    stream.queue('beep boop\n');
    return stream;
}
```

```
$ node example/resume.js
beep boop
```

# methods

``` js
var resumer = require('@ljharb/resumer')
```

## resumer(write, end)

Return a new through stream from `write` and `end`, which default to pass-through `.queue()` functions if not specified.

The stream starts out paused and will be resumed on the next tick unless you call `.pause()` first.

`write` and `end` get passed directly through to [through](https://npmjs.com/package/through).

# install

With [npm](https://npmjs.org) do:

```
npm install @ljharb/resumer
```

# license

MIT

[package-url]: https://npmjs.org/package/@ljharb/resumer
[npm-version-svg]: https://versionbadg.es/ljharb/resumer.svg
[deps-svg]: https://david-dm.org/ljharb/resumer.svg
[deps-url]: https://david-dm.org/ljharb/resumer
[dev-deps-svg]: https://david-dm.org/ljharb/resumer/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/resumer#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/@ljharb/resumer.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/@ljharb/resumer.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/@ljharb/resumer.svg
[downloads-url]: https://npm-stat.com/charts.html?package=@ljharb/resumer
[codecov-image]: https://codecov.io/gh/ljharb/resumer/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/resumer/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/resumer
[actions-url]: https://github.com/ljharb/resumer/actions

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