# fifo-transform

> Layer on ordering to your stream. Use before sending over a transport that doesn't guarantee fifo ordering.

Latest version **2.0.0** (published 2018-07-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install fifo-transform
pnpm add fifo-transform
yarn add fifo-transform
bun add fifo-transform
```

## 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 | 2.0.0 |
| Published | 2018-07-11 |
| First published | 2015-05-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | kumavis |
| Maintainers | kumavis |

## Links

- npm: https://www.npmjs.com/package/fifo-transform
- Repository: https://github.com/kumavis/fifo-transform
- Issues: https://github.com/kumavis/fifo-transform/issues
- npm.io page: https://npm.io/package/fifo-transform

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^2.0.3

## Recent versions

- 2.0.0 (latest) — 2018-07-11
- 1.0.2 — 2015-05-01
- 1.0.1 — 2015-05-01
- 1.0.0 — 2015-05-01

## README

### Fifo Transform

Layer on ordering to your stream.
Use before sending over a transport that doesn't guarantee fifo ordering.


```js
const { createFifoWrapper, createFifoUnwrapper } = require('fifo-transform')

inputStream
  .pipe(createFifoWrapper())
  .pipe(chaos)
  .pipe(createFifoUnwrapper())
  .pipe(outputStream)
```

#### api

We append (and remove) an ordering number to the front of the buffer of a specified length.
How many messages do you expect to be in a jumble at once?
It will support up to `Math.pow(2, byteLength * 8)` simultaneously in-transit messages.
Default byteLength is 1, allowing 256 messages to be in jumble at once.

```js
var wrapper = createFifoWrapper({ byteLength: 2 })
var unwrapper = createFifoUnwrapper({ byteLength: 2 })
```

#### note

Currently does not work with streams in object mode.

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