| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 375bec0 commit efdd7c8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,13 +26,6 @@ const stream = require('stream'); | |||
| 26 | 26 | ||
| 27 | 27 | let passed = false; | |
| 28 | 28 | ||
| 29 | - class PassThrough extends stream.Transform { | ||
| 30 | - _transform(chunk, encoding, done) { | ||
| 31 | - this.push(chunk); | ||
| 32 | - done(); | ||
| 33 | - } | ||
| 34 | - } | ||
| 35 | - | ||
| 36 | 29 | class TestStream extends stream.Transform { | |
| 37 | 30 | _transform(chunk, encoding, done) { | |
| 38 | 31 | if (!passed) { | |
@@ -43,8 +36,8 @@ class TestStream extends stream.Transform { | |||
| 43 | 36 | } | |
| 44 | 37 | } | |
| 45 | 38 | ||
| 46 | - const s1 = new PassThrough(); | ||
| 47 | - const s2 = new PassThrough(); | ||
| 39 | + const s1 = new stream.PassThrough(); | ||
| 40 | + const s2 = new stream.PassThrough(); | ||
| 48 | 41 | const s3 = new TestStream(); | |
| 49 | 42 | s1.pipe(s3); | |
| 50 | 43 | // Don't let s2 auto close which may close s3 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments