equal-stream-contents

0.1.6 • Public • Published

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 does for example).

Leveraging module gulp-cached, function equalStreamContents allows for such a comparison on the fly.

Note that function equalStreamContents is not a Gulp plugin.

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.

© 2016-2017 Jason Lenoble

Readme

Keywords

none

Package Sidebar

Install

npm i equal-stream-contents

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

14.1 kB

Total Files

18

Last publish

Collaborators

  • jlenoble