We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
validateArray
1 parent fdce138 commit 60e51adCopy full SHA for 60e51ad
lib/internal/worker.js
@@ -1,7 +1,6 @@
1
'use strict';
2
3
const {
4
- ArrayIsArray,
5
ArrayPrototypeForEach,
6
ArrayPrototypeMap,
7
ArrayPrototypePush,
@@ -123,11 +122,9 @@ class Worker extends EventEmitter {
123
122
constructor(filename, options = {}) {
124
super();
125
debug(`[${threadId}] create new worker`, filename, options);
126
- if (options.execArgv && !ArrayIsArray(options.execArgv)) {
127
- throw new ERR_INVALID_ARG_TYPE('options.execArgv',
128
- 'Array',
129
- options.execArgv);
130
- }
+ if (options.execArgv)
+ validateArray(options.execArgv, 'options.execArgv');
+
131
let argv;
132
if (options.argv) {
133
validateArray(options.argv, 'options.argv');
0 commit comments