@@ -186,7 +186,7 @@ Client.prototype._addScript = function(desc) {
186
186
this . scripts [ desc . id ] = desc ;
187
187
if ( desc . name ) {
188
188
desc . isNative = ( desc . name . replace ( '.js' , '' ) in natives ) ||
189
- desc . name == 'node.js' ;
189
+ desc . name === 'node.js' ;
190
190
}
191
191
} ;
192
192
@@ -201,7 +201,7 @@ Client.prototype._onResponse = function(res) {
201
201
var index = - 1 ;
202
202
203
203
this . _reqCallbacks . some ( function ( fn , i ) {
204
- if ( fn . request_seq == res . body . request_seq ) {
204
+ if ( fn . request_seq === res . body . request_seq ) {
205
205
cb = fn ;
206
206
index = i ;
207
207
return true ;
@@ -211,25 +211,25 @@ Client.prototype._onResponse = function(res) {
211
211
var self = this ;
212
212
var handled = false ;
213
213
214
- if ( res . headers . Type == 'connect' ) {
214
+ if ( res . headers . Type === 'connect' ) {
215
215
// Request a list of scripts for our own storage.
216
216
self . reqScripts ( ) ;
217
217
self . emit ( 'ready' ) ;
218
218
handled = true ;
219
219
220
- } else if ( res . body && res . body . event == 'break' ) {
220
+ } else if ( res . body && res . body . event === 'break' ) {
221
221
this . emit ( 'break' , res . body ) ;
222
222
handled = true ;
223
223
224
- } else if ( res . body && res . body . event == 'exception' ) {
224
+ } else if ( res . body && res . body . event === 'exception' ) {
225
225
this . emit ( 'exception' , res . body ) ;
226
226
handled = true ;
227
227
228
- } else if ( res . body && res . body . event == 'afterCompile' ) {
228
+ } else if ( res . body && res . body . event === 'afterCompile' ) {
229
229
this . _addHandle ( res . body . body . script ) ;
230
230
handled = true ;
231
231
232
- } else if ( res . body && res . body . event == 'scriptCollected' ) {
232
+ } else if ( res . body && res . body . event === 'scriptCollected' ) {
233
233
// ???
234
234
this . _removeScript ( res . body . body . script ) ;
235
235
handled = true ;
@@ -327,7 +327,7 @@ Client.prototype.reqScopes = function(cb) {
327
327
Client . prototype . reqEval = function ( expression , cb ) {
328
328
var self = this ;
329
329
330
- if ( this . currentFrame == NO_FRAME ) {
330
+ if ( this . currentFrame === NO_FRAME ) {
331
331
// Only need to eval in global scope.
332
332
this . reqFrameEval ( expression , NO_FRAME , cb ) ;
333
333
return ;
@@ -357,7 +357,7 @@ Client.prototype.reqEval = function(expression, cb) {
357
357
358
358
// Finds the first scope in the array in which the expression evals.
359
359
Client . prototype . _reqFramesEval = function ( expression , evalFrames , cb ) {
360
- if ( evalFrames . length == 0 ) {
360
+ if ( evalFrames . length === 0 ) {
361
361
// Just eval in global scope.
362
362
this . reqFrameEval ( expression , NO_FRAME , cb ) ;
363
363
return ;
@@ -381,7 +381,7 @@ Client.prototype.reqFrameEval = function(expression, frame, cb) {
381
381
arguments : { expression : expression }
382
382
} ;
383
383
384
- if ( frame == NO_FRAME ) {
384
+ if ( frame === NO_FRAME ) {
385
385
req . arguments . global = true ;
386
386
} else {
387
387
req . arguments . frame = frame ;
@@ -528,9 +528,9 @@ Client.prototype.mirrorObject = function(handle, depth, cb) {
528
528
var mirror ;
529
529
var waiting = 1 ;
530
530
531
- if ( handle . className == 'Array' ) {
531
+ if ( handle . className === 'Array' ) {
532
532
mirror = [ ] ;
533
- } else if ( handle . className == 'Date' ) {
533
+ } else if ( handle . className === 'Date' ) {
534
534
mirror = new Date ( handle . value ) ;
535
535
} else {
536
536
mirror = { } ;
@@ -770,10 +770,20 @@ function Interface(stdin, stdout, args) {
770
770
process . once ( 'SIGHUP' , process . exit . bind ( process , 0 ) ) ;
771
771
772
772
var proto = Interface . prototype ;
773
- const ignored = [ 'pause' , 'resume' , 'exitRepl' , 'handleBreak' ,
774
- 'requireConnection' , 'killChild' , 'trySpawn' ,
775
- 'controlEval' , 'debugEval' , 'print' , 'childPrint' ,
776
- 'clearline' ] ;
773
+ const ignored = [
774
+ 'pause' ,
775
+ 'resume' ,
776
+ 'exitRepl' ,
777
+ 'handleBreak' ,
778
+ 'requireConnection' ,
779
+ 'killChild' ,
780
+ 'trySpawn' ,
781
+ 'controlEval' ,
782
+ 'debugEval' ,
783
+ 'print' ,
784
+ 'childPrint' ,
785
+ 'clearline'
786
+ ] ;
777
787
const shortcut = {
778
788
'run' : 'r' ,
779
789
'cont' : 'c' ,
@@ -1093,14 +1103,14 @@ Interface.prototype.list = function(delta) {
1093
1103
var lineno = res . fromLine + i + 1 ;
1094
1104
if ( lineno < from || lineno > to ) continue ;
1095
1105
1096
- const current = lineno == 1 + client . currentSourceLine ;
1106
+ const current = lineno === 1 + client . currentSourceLine ;
1097
1107
const breakpoint = client . breakpoints . some ( function ( bp ) {
1098
1108
return ( bp . scriptReq === client . currentScript ||
1099
1109
bp . script === client . currentScript ) &&
1100
- bp . line == lineno ;
1110
+ bp . line === lineno ;
1101
1111
} ) ;
1102
1112
1103
- if ( lineno == 1 ) {
1113
+ if ( lineno === 1 ) {
1104
1114
// The first line needs to have the module wrapper filtered out of
1105
1115
// it.
1106
1116
var wrapper = Module . wrapper [ 0 ] ;
@@ -1147,7 +1157,7 @@ Interface.prototype.backtrace = function() {
1147
1157
return ;
1148
1158
}
1149
1159
1150
- if ( bt . totalFrames == 0 ) {
1160
+ if ( bt . totalFrames === 0 ) {
1151
1161
self . print ( '(empty stack)' ) ;
1152
1162
} else {
1153
1163
const trace = [ ] ;
@@ -1189,10 +1199,10 @@ Interface.prototype.scripts = function() {
1189
1199
var script = client . scripts [ id ] ;
1190
1200
if ( script !== null && typeof script === 'object' && script . name ) {
1191
1201
if ( displayNatives ||
1192
- script . name == client . currentScript ||
1202
+ script . name === client . currentScript ||
1193
1203
! script . isNative ) {
1194
1204
scripts . push (
1195
- ( script . name == client . currentScript ? '* ' : ' ' ) +
1205
+ ( script . name === client . currentScript ? '* ' : ' ' ) +
1196
1206
id + ': ' +
1197
1207
path . basename ( script . name )
1198
1208
) ;
0 commit comments