@@ -454,7 +454,7 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) {
454
454
455
455
// this = Interface instance
456
456
function handleGroup ( self , group , width , maxColumns ) {
457
- if ( group . length == 0 ) {
457
+ if ( group . length === 0 ) {
458
458
return ;
459
459
}
460
460
var minRows = Math . ceil ( group . length / maxColumns ) ;
@@ -479,15 +479,15 @@ function handleGroup(self, group, width, maxColumns) {
479
479
}
480
480
481
481
function commonPrefix ( strings ) {
482
- if ( ! strings || strings . length == 0 ) {
482
+ if ( ! strings || strings . length === 0 ) {
483
483
return '' ;
484
484
}
485
485
if ( strings . length === 1 ) return strings [ 0 ] ;
486
486
var sorted = strings . slice ( ) . sort ( ) ;
487
487
var min = sorted [ 0 ] ;
488
488
var max = sorted [ sorted . length - 1 ] ;
489
489
for ( var i = 0 , len = min . length ; i < len ; i ++ ) {
490
- if ( min [ i ] != max [ i ] ) {
490
+ if ( min [ i ] !== max [ i ] ) {
491
491
return min . slice ( 0 , i ) ;
492
492
}
493
493
}
@@ -702,7 +702,7 @@ Interface.prototype._ttyWrite = function(s, key) {
702
702
this . _previousKey = key ;
703
703
704
704
// Ignore escape key - Fixes #2876
705
- if ( key . name == 'escape' ) return ;
705
+ if ( key . name === 'escape' ) return ;
706
706
707
707
if ( key . ctrl && key . shift ) {
708
708
/* Control and shift pressed */
@@ -783,7 +783,7 @@ Interface.prototype._ttyWrite = function(s, key) {
783
783
break ;
784
784
785
785
case 'z' :
786
- if ( process . platform == 'win32' ) break ;
786
+ if ( process . platform === 'win32' ) break ;
787
787
if ( this . listenerCount ( 'SIGTSTP' ) > 0 ) {
788
788
this . emit ( 'SIGTSTP' ) ;
789
789
} else {
@@ -995,7 +995,7 @@ function emitKeypressEvents(stream, iface) {
995
995
}
996
996
997
997
function onNewListener ( event ) {
998
- if ( event == 'keypress' ) {
998
+ if ( event === 'keypress' ) {
999
999
stream . on ( 'data' , onData ) ;
1000
1000
stream . removeListener ( 'newListener' , onNewListener ) ;
1001
1001
}
0 commit comments