# plexer

> Create a duplex stream from a readable and a writable stream.

Latest version **4.0.1** (published 2026-04-07) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2026-04-07 |
| First published | 2014-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.14.0 |
| Dependencies | 1 |
| Unpacked size | 92.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Nicolas Froidure |
| Maintainers | nfroidure |
| Keywords | duplexer, streaming, stream2, stream, readable, writable, async, pipe |

## Links

- npm: https://www.npmjs.com/package/plexer
- Repository: https://github.com/nfroidure/plexer
- Issues: https://github.com/nfroidure/plexer/issues
- Funding: https://github.com/sponsors/nfroidure
- npm.io page: https://npm.io/package/plexer

## Dependencies (1)

- [yerror](https://npm.io/package/yerror.md) ^11.0.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2026-04-07
- 4.0.0 — 2026-03-27
- 3.0.0 — 2024-07-18
- 2.0.0 — 2019-08-27
- 1.0.3 — 2019-08-27
- 1.0.2 — 2017-12-03
- 1.0.1 — 2015-09-07
- 1.0.0 — 2015-08-02
- 0.0.3 — 2014-04-26
- 0.0.2 — 2014-03-29
- 0.0.1 — 2014-02-17
- 0.0.0 — 2014-02-16

## README

[//]: # ( )
[//]: # (This file is automatically generated by a `metapak`)
[//]: # (module. Do not change it  except between the)
[//]: # (`content:start/end` flags, your changes would)
[//]: # (be overridden.)
[//]: # ( )
# plexer
> Create a duplex stream from a readable and a writable stream.

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/plexer/blob/main/LICENSE)


[//]: # (::contents:start)

## Stats

[![NPM](https://nodei.co/npm/plexer.png?downloads=true&stars=true)](https://nodei.co/npm/plexer/)
[![NPM](https://nodei.co/npm-dl/plexer.png)](https://nodei.co/npm/plexer/)

## Contributing

Feel free to pull your code if you agree with publishing it under the MIT
license.

[//]: # (::contents:end)

# API
## Classes

<dl>
<dt><a href="#Duplexer">Duplexer</a></dt>
<dd><p>Create a duplex stream from a readable and a writable stream.cd</p>
</dd>
</dl>

## Functions

<dl>
<dt><a href="#createObjectsDuplexer">createObjectsDuplexer(optionsOrWritableStream, writableStreamOrReadableStream, maybeReadableStream)</a> ⇒</dt>
<dd><p>A shortcut for <code>new Duplexer({objectMode: true}, writable, readable)</code>.</p>
</dd>
<dt><a href="#createDuplexer">createDuplexer(optionsOrWritableStream, writableStreamOrReadableStream, maybeReadableStream)</a> ⇒</dt>
<dd><p>A functional version of Duplexer.</p>
</dd>
</dl>

<a name="Duplexer"></a>

## Duplexer
Create a duplex stream from a readable and a writable stream.cd

**Kind**: global class  
<a name="new_Duplexer_new"></a>

### new Duplexer(optionsOrWritableStream, writableStreamOrReadableStream, a)
Creates the Duplexer instance

**Returns**: Duplexer  

| Param | Type | Description |
| --- | --- | --- |
| optionsOrWritableStream |  | options or the writable stream |
| writableStreamOrReadableStream |  | writable or readable stream |
| a | <code>maybeReadableStream</code> | readable stream |

<a name="createObjectsDuplexer"></a>

## createObjectsDuplexer(optionsOrWritableStream, writableStreamOrReadableStream, maybeReadableStream) ⇒
A shortcut for `new Duplexer({objectMode: true}, writable, readable)`.

**Kind**: global function  
**Returns**: Duplexer  

| Param |
| --- |
| optionsOrWritableStream | 
| writableStreamOrReadableStream | 
| maybeReadableStream | 

<a name="createDuplexer"></a>

## createDuplexer(optionsOrWritableStream, writableStreamOrReadableStream, maybeReadableStream) ⇒
A functional version of Duplexer.

**Kind**: global function  
**Returns**: Duplexer  

| Param |
| --- |
| optionsOrWritableStream | 
| writableStreamOrReadableStream | 
| maybeReadableStream | 


# Authors
- [Nicolas Froidure](http://insertafter.com/en/index.html)

# License
[MIT](https://github.com/nfroidure/plexer/blob/main/LICENSE)

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