File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -520,7 +520,10 @@ export class ProcessPromise extends Promise<ProcessOutput> {
520
520
return this
521
521
}
522
522
523
- timeout ( d : Duration , signal = $ . timeoutSignal ) : ProcessPromise {
523
+ timeout (
524
+ d : Duration ,
525
+ signal = this . _timeoutSignal || $ . timeoutSignal
526
+ ) : ProcessPromise {
524
527
if ( this . _resolved ) return this
525
528
526
529
this . _timeout = parseDuration ( d )
Original file line number Diff line number Diff line change @@ -27,12 +27,24 @@ cronometro({
27
27
buf_arr_reduce_decode ( ) {
28
28
BUF_ARR . reduce ( ( acc , buf ) => acc + decoder . decode ( buf ) , '' )
29
29
} ,
30
+ buf_arr_reduce_to_string ( ) {
31
+ BUF_ARR . reduce ( ( acc , buf ) => acc + buf . toString ( 'utf8' ) , '' )
32
+ } ,
30
33
buf_arr_for_decode ( ) {
31
34
let res = ''
32
35
for ( const buf of BUF_ARR ) {
33
36
res += decoder . decode ( buf )
34
37
}
35
38
} ,
39
+ buf_arr_while_decode ( ) {
40
+ let res = ''
41
+ let i = 0
42
+ const bl = BUF_ARR . length
43
+ while ( i < bl ) {
44
+ res += decoder . decode ( BUF_ARR [ i ] )
45
+ i ++
46
+ }
47
+ } ,
36
48
buf_arr_join ( ) {
37
49
BUF_ARR . join ( '' )
38
50
} ,
You can’t perform that action at this time.
0 commit comments