|
22 | 22 | 'use strict'; |
23 | 23 |
|
24 | 24 | const{ |
| 25 | + ArrayIsArray, |
25 | 26 | ObjectAssign, |
26 | 27 | ObjectDefineProperty, |
27 | 28 | ObjectPrototypeHasOwnProperty, |
@@ -63,7 +64,7 @@ function fork(modulePath /* , args, options */) { |
63 | 64 | letoptions={}; |
64 | 65 | letargs=[]; |
65 | 66 | letpos=1; |
66 | | -if(pos<arguments.length&&Array.isArray(arguments[pos])){ |
| 67 | +if(pos<arguments.length&&ArrayIsArray(arguments[pos])){ |
67 | 68 | args=arguments[pos++]; |
68 | 69 | } |
69 | 70 |
|
@@ -96,7 +97,7 @@ function fork(modulePath /* , args, options */) { |
96 | 97 |
|
97 | 98 | if(typeofoptions.stdio==='string'){ |
98 | 99 | options.stdio=stdioStringToArray(options.stdio,'ipc'); |
99 | | -}elseif(!Array.isArray(options.stdio)){ |
| 100 | +}elseif(!ArrayIsArray(options.stdio)){ |
100 | 101 | // Use a separate fd=3 for the IPC channel. Inherit stdin, stdout, |
101 | 102 | // and stderr from the parent if silent isn't set. |
102 | 103 | options.stdio=stdioStringToArray( |
@@ -186,7 +187,7 @@ function execFile(file /* , args, options, callback */) { |
186 | 187 |
|
187 | 188 | // Parse the optional positional parameters. |
188 | 189 | letpos=1; |
189 | | -if(pos<arguments.length&&Array.isArray(arguments[pos])){ |
| 190 | +if(pos<arguments.length&&ArrayIsArray(arguments[pos])){ |
190 | 191 | args=arguments[pos++]; |
191 | 192 | }elseif(pos<arguments.length&&arguments[pos]==null){ |
192 | 193 | pos++; |
@@ -404,7 +405,7 @@ function normalizeSpawnArguments(file, args, options) { |
404 | 405 | if(file.length===0) |
405 | 406 | thrownewERR_INVALID_ARG_VALUE('file',file,'cannot be empty'); |
406 | 407 |
|
407 | | -if(Array.isArray(args)){ |
| 408 | +if(ArrayIsArray(args)){ |
408 | 409 | args=args.slice(0); |
409 | 410 | }elseif(args==null){ |
410 | 411 | args=[]; |
|
0 commit comments