# @jacobbubu/pull-bitflipper

> [![Build Status](https://github.com/jacobbubu/pull-bitflipper/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-bitflipper/actions?query=workflow%3A%22Build+and+Release%22) [![Coverage Status](https://coveralls.io/repos/github/

Latest version **1.0.0** (published 2020-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jacobbubu/pull-bitflipper
pnpm add @jacobbubu/pull-bitflipper
yarn add @jacobbubu/pull-bitflipper
bun add @jacobbubu/pull-bitflipper
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-04-09 |
| First published | 2020-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jacobbubu |
| Maintainers | jacobbubu |

## Links

- npm: https://www.npmjs.com/package/@jacobbubu/pull-bitflipper
- npm.io page: https://npm.io/package/@jacobbubu/pull-bitflipper

## Dependencies (1)

- [pull-stream](https://npm.io/package/pull-stream.md) ^3.6.14

## Recent versions

- 1.0.0 (latest) — 2020-04-09

## README

# @jacobbubu/pull-bitflipper

[![Build Status](https://github.com/jacobbubu/pull-bitflipper/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-bitflipper/actions?query=workflow%3A%22Build+and+Release%22)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/pull-bitflipper/badge.svg)](https://coveralls.io/github/jacobbubu/pull-bitflipper)
[![npm](https://img.shields.io/npm/v/@jacobbubu/pull-bitflipper.svg)](https://www.npmjs.com/package/@jacobbubu/pull-bitflipper/)

> Rewritten [pull-bitflipper](https://github.com/dominictarr/pull-bitflipper) in TypeScript.

# pull-bitflipper

pull stream that randomly flips bits in input stream,
useful for testing authenticated cryptography.

## Example

``` js
import bitFlipper from '@jacobbubu/pull-bitflipper'

pull(
  // Create a source that calls a callback when it gets aborted.
  source(function onAbort(err) {
    // This should be called when the output fails because a bit was filpped.
  }),

  createEncryptStream(),

  // Pass in the probability that a particular message should
  // Contain a flipped bit.
  bitFlipper(prop = 0.1),

  createDecryptStream(),

  sink(function (err) {
    // The sink should error when the decryption stream
    // finds a packet that does not authenticate.
  })
)

```

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