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