# equal-stream-contents

> Compare two streams on the fly (no writing on disc)

Latest version **0.1.6** (published 2018-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install equal-stream-contents
pnpm add equal-stream-contents
yarn add equal-stream-contents
bun add equal-stream-contents
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2018-10-08 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.3.0 |
| Dependencies | 3 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jason Lenoble |
| Maintainers | jlenoble |

## Links

- npm: https://www.npmjs.com/package/equal-stream-contents
- Repository: https://github.com/jlenoble/equal-stream-contents
- Homepage: https://github.com/jlenoble/equal-stream-contents#readme
- Issues: https://github.com/jlenoble/equal-stream-contents/issues
- npm.io page: https://npm.io/package/equal-stream-contents

## Dependencies (3)

- [explanation](https://npm.io/package/explanation.md) ^0.1.1
- [gulp-cached](https://npm.io/package/gulp-cached.md) ^1.1.0
- [stream-to-promise](https://npm.io/package/stream-to-promise.md) ^2.2.0

## Recent versions

- 0.1.6 (latest) — 2018-10-08
- 0.1.5 — 2017-12-20
- 0.1.4 — 2017-12-15
- 0.1.3 — 2017-03-19
- 0.1.2 — 2016-12-15
- 0.1.1 — 2016-12-07
- 0.1.0 — 2016-11-01

## README

# equal-stream-contents
Compare two streams on the fly (no writing on disc)

## Usage

When testing streams, you may want to check their contents against other streams instead of against files on disc (which is what module [gulp-diff](https://www.npmjs.com/package/gulp-diff) does for example).

Leveraging module [gulp-cached](https://www.npmjs.com/package/gulp-cached), function ```equalStreamContents``` allows for such a comparison on the fly.

Note that function ```equalStreamContents``` is not a [Gulp](http://gulpjs.com/) plugin.

```js
import gulp from 'gulp';
import equalStreamContents from 'equal-stream-contents';

const stream1 = gulp.src('dir1/**/*.js');
const stream2 = gulp.src('dir1/*.js');

equalStreamContents(stream1, stream2).then(() => {
  // Equality branch
}, err => {
  // Inequality branch
});
```

## License

equal-stream-contents is [MIT licensed](./LICENSE).

© 2016-2017 [Jason Lenoble](mailto:jason.lenoble@gmail.com)

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