File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3- var Writable = require ( 'readable- stream/writable ' ) ;
3+ var Writable = require ( 'flush-write- stream' ) ;
44
55function listenerCount ( stream , evt ) {
66 return stream . listeners ( evt ) . length ;
@@ -10,14 +10,17 @@ function hasListeners(stream) {
1010 return ! ! ( listenerCount ( stream , 'readable' ) || listenerCount ( stream , 'data' ) ) ;
1111}
1212
13+ var sinkOptions = {
14+ objectMode : true ,
15+ } ;
16+
17+ function sinker ( file , enc , callback ) {
18+ callback ( ) ;
19+ }
20+
1321function sink ( stream ) {
1422 var sinkAdded = false ;
15- var sinkStream = new Writable ( {
16- objectMode : true ,
17- write : function ( file , enc , callback ) {
18- callback ( ) ;
19- } ,
20- } ) ;
23+ var sinkStream = new Writable ( sinkOptions , sinker ) ;
2124
2225 function addSink ( ) {
2326 if ( sinkAdded ) {
Original file line number Diff line number Diff line change 3636 "lodash.isequal" : " ^4.0.0" ,
3737 "merge-stream" : " ^1.0.0" ,
3838 "object-assign" : " ^4.0.0" ,
39- "readable-stream" : " ^2.0.4" ,
4039 "strip-bom" : " ^2.0.0" ,
4140 "strip-bom-stream" : " ^1.0.0" ,
4241 "through2" : " ^2.0.0" ,
You can’t perform that action at this time.
0 commit comments