File tree 2 files changed +6
-6
lines changed
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 {
15
15
case 0 :
16
16
return this . push ( null ) ;
17
17
case 1 :
18
- return setTimeout ( function ( ) {
18
+ return setTimeout ( ( ) => {
19
19
this . push ( 'last chunk' ) ;
20
- } . bind ( this ) , 100 ) ;
20
+ } , 100 ) ;
21
21
case 2 :
22
22
return this . push ( 'second to last chunk' ) ;
23
23
case 3 :
24
- return process . nextTick ( function ( ) {
24
+ return process . nextTick ( ( ) => {
25
25
this . push ( 'first chunk' ) ;
26
- } . bind ( this ) ) ;
26
+ } ) ;
27
27
default :
28
28
throw new Error ( '?' ) ;
29
29
}
Original file line number Diff line number Diff line change @@ -190,14 +190,14 @@ const Transform = require('_stream_transform');
190
190
if ( ! chunk )
191
191
chunk = '' ;
192
192
const s = chunk . toString ( ) ;
193
- setTimeout ( function ( ) {
193
+ setTimeout ( ( ) => {
194
194
this . state += s . charAt ( 0 ) ;
195
195
if ( this . state . length === 3 ) {
196
196
pt . push ( Buffer . from ( this . state ) ) ;
197
197
this . state = '' ;
198
198
}
199
199
cb ( ) ;
200
- } . bind ( this ) , 10 ) ;
200
+ } , 10 ) ;
201
201
} ;
202
202
203
203
pt . _flush = function ( cb ) {
You can’t perform that action at this time.
0 commit comments