File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323'use strict' ;
2424
2525const {
26+ ArrayPrototypeSome,
2627 RegExpPrototypeTest,
2728 StringPrototypeSplit,
2829 StringPrototypeToLowerCase,
@@ -202,10 +203,9 @@ function getColorDepth(env = process.env) {
202203if ( TERM_ENVS [ termEnv ] ) {
203204return TERM_ENVS [ termEnv ] ;
204205}
205- for ( const term of TERM_ENVS_REG_EXP ) {
206- if ( RegExpPrototypeTest ( term , termEnv ) ) {
207- return COLORS_16 ;
208- }
206+ if ( ArrayPrototypeSome ( TERM_ENVS_REG_EXP ,
207+ ( term ) => RegExpPrototypeTest ( term , termEnv ) ) ) {
208+ return COLORS_16 ;
209209}
210210}
211211// Move 16 color COLORTERM below 16m and 256
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ WriteStream.prototype._refreshSize = function() {
132132this . emit ( 'error' , errors . errnoException ( err , 'getWindowSize' ) ) ;
133133return ;
134134}
135- const [ newCols , newRows ] = winSize ;
135+ const { 0 : newCols , 1 : newRows } = winSize ;
136136if ( oldCols !== newCols || oldRows !== newRows ) {
137137this . columns = newCols ;
138138this . rows = newRows ;
You can’t perform that action at this time.
0 commit comments