# through3

> Extend stream classes.

Latest version **1.1.7** (published 2022-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install through3
pnpm add through3
yarn add through3
bun add through3
```

## 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.1.7 |
| Published | 2022-03-24 |
| First published | 2015-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | muji |
| Maintainers | muji, tmpfs |
| Keywords | stream, transform, duplex, readable, writable, passthrough |

## Links

- npm: https://www.npmjs.com/package/through3
- Repository: https://github.com/tmpfs/through3
- Homepage: https://github.com/tmpfs/through3#readme
- Issues: https://github.com/tmpfs/through3/issues
- npm.io page: https://npm.io/package/through3

## Recent versions

- 1.1.7 (latest) — 2022-03-24
- 1.1.6 — 2016-03-20
- 1.1.5 — 2015-04-20
- 1.1.4 — 2015-04-20
- 1.1.3 — 2015-04-20
- 1.1.2 — 2015-04-18
- 1.1.1 — 2015-04-18
- 1.1.0 — 2015-04-18
- 1.0.1 — 2015-04-18

## README

Table of Contents
=================

* [Through](#through)
  * [Install](#install)
  * [API](#api)
    * [through3](#through3)
      * [extend](#extend)
      * [transform](#transform)
      * [cork](#cork)
      * [passthrough](#passthrough)
  * [Developer](#developer)
    * [Test](#test)
    * [Cover](#cover)
    * [Documentation](#documentation)
    * [Readme](#readme)
  * [License](#license)

Through
=======

[<img src="https://travis-ci.org/tmpfs/through3.svg" alt="Build Status">](https://travis-ci.org/tmpfs/through3)
[<img src="http://img.shields.io/npm/v/through3.svg" alt="npm version">](https://npmjs.org/package/through3)
[<img src="https://coveralls.io/repos/tmpfs/through3/badge.svg?branch=master&service=github&v=1" alt="Coverage Status">](https://coveralls.io/github/tmpfs/through3?branch=master).

Stream extends library tracking latest stable [node](http://nodejs.org) with no external dependencies.

Requires [node](http://nodejs.org) (>=0.11).

## Install

```
npm i through3 --save
```

## API

### through3

Utilities for creating stream subclass functions.

#### extend

```javascript
extend(type, ctor[, opts])
```

Creates a stream subclass.

Returns a stream subclass.

* `type` Function The super class.
* `ctor` Function Constructor for the subclass.
* `opts` Object Default constructor options.

#### transform

```javascript
transform(fn[, flush][, opts])
```

Creates a transform stream subclass.

Returns transform stream subclass.

* `fn` Function The transform function.
* `flush` Function A flush function.
* `opts` Object Default constructor options.

#### cork

```javascript
cork()
```

Creates a pass through stream subclass that calls cork to buffer all
input and write on end.

Useful when you need all the data before operations can begin.

Returns stream class that buffers the input.

#### passthrough

```javascript
passthrough(opts)
```

Get a pass through stream class.

Returns a stream that passes through data.

* `opts` Object Stream construct options.

## Developer

### Test

Tests are not included in the package, clone the repository:

```
npm test
```

### Cover

To generate code coverage run:

```
npm run cover
```

### Documentation

To generate all documentation:

```
npm run docs
```

### Readme

To build the readme file from the partial definitions (requires [mdp](https://github.com/tmpfs/mdp)):

```
npm run readme
```

## License

Everything is [MIT](http://en.wikipedia.org/wiki/MIT_License). Read the [license](https://github.com/tmpfs/through3/blob/master/LICENSE) if you feel inclined.

Generated by [mdp(1)](https://github.com/tmpfs/mdp).

[node]: http://nodejs.org
[npm]: http://www.npmjs.org
[mdp]: https://github.com/tmpfs/mdp

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