File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ class MyStream extends Readable {
1515 case 0 :
1616 return this . push ( null ) ;
1717 case 1 :
18- return setTimeout ( function ( ) {
18+ return setTimeout ( ( ) => {
1919 this . push ( 'last chunk' ) ;
20- } . bind ( this ) , 100 ) ;
20+ } , 100 ) ;
2121 case 2 :
2222 return this . push ( 'second to last chunk' ) ;
2323 case 3 :
24- return process . nextTick ( function ( ) {
24+ return process . nextTick ( ( ) => {
2525 this . push ( 'first chunk' ) ;
26- } . bind ( this ) ) ;
26+ } ) ;
2727 default :
2828 throw new Error ( '?' ) ;
2929 }
Original file line number Diff line number Diff line change @@ -190,14 +190,14 @@ const Transform = require('_stream_transform');
190190 if ( ! chunk )
191191 chunk = '' ;
192192 const s = chunk . toString ( ) ;
193- setTimeout ( function ( ) {
193+ setTimeout ( ( ) => {
194194 this . state += s . charAt ( 0 ) ;
195195 if ( this . state . length === 3 ) {
196196 pt . push ( Buffer . from ( this . state ) ) ;
197197 this . state = '' ;
198198 }
199199 cb ( ) ;
200- } . bind ( this ) , 10 ) ;
200+ } , 10 ) ;
201201 } ;
202202
203203 pt . _flush = function ( cb ) {
You can’t perform that action at this time.
0 commit comments