mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
readline: update 6 comparions to strict
PR-URL: https://github.com/nodejs/node/pull/11078 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
1 parent
a557d6ce1d
commit
a40f8429e6
1 file changed
+6
-6
+6
-6
@@ -424,7 +424,7 @@ Interface.prototype._tabComplete = function() {
|
||||
|
||||
// this = Interface instance
|
||||
function handleGroup(self, group, width, maxColumns) {
|
||||
if (group.length == 0) {
|
||||
if (group.length === 0) {
|
||||
return;
|
||||
}
|
||||
var minRows = Math.ceil(group.length / maxColumns);
|
||||
@@ -449,14 +449,14 @@ function handleGroup(self, group, width, maxColumns) {
|
||||
}
|
||||
|
||||
function commonPrefix(strings) {
|
||||
if (!strings || strings.length == 0) {
|
||||
if (!strings || strings.length === 0) {
|
||||
return '';
|
||||
}
|
||||
var sorted = strings.slice().sort();
|
||||
var min = sorted[0];
|
||||
var max = sorted[sorted.length - 1];
|
||||
for (var i = 0, len = min.length; i < len; i++) {
|
||||
if (min[i] != max[i]) {
|
||||
if (min[i] !== max[i]) {
|
||||
return min.slice(0, i);
|
||||
}
|
||||
}
|
||||
@@ -669,7 +669,7 @@ Interface.prototype._ttyWrite = function(s, key) {
|
||||
key = key || {};
|
||||
|
||||
// Ignore escape key - Fixes #2876
|
||||
if (key.name == 'escape') return;
|
||||
if (key.name === 'escape') return;
|
||||
|
||||
if (key.ctrl && key.shift) {
|
||||
/* Control and shift pressed */
|
||||
@@ -750,7 +750,7 @@ Interface.prototype._ttyWrite = function(s, key) {
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
if (process.platform == 'win32') break;
|
||||
if (process.platform === 'win32') break;
|
||||
if (this.listenerCount('SIGTSTP') > 0) {
|
||||
this.emit('SIGTSTP');
|
||||
} else {
|
||||
@@ -955,7 +955,7 @@ function emitKeypressEvents(stream, iface) {
|
||||
}
|
||||
|
||||
function onNewListener(event) {
|
||||
if (event == 'keypress') {
|
||||
if (event === 'keypress') {
|
||||
stream.on('data', onData);
|
||||
stream.removeListener('newListener', onNewListener);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user