File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33const {
4- ArrayIsArray,
54 ArrayPrototypeJoin,
65 SafeSet,
76 Symbol,
@@ -17,7 +16,6 @@ const kMaxTracingCount = 10;
1716const {
1817 ERR_TRACE_EVENTS_CATEGORY_REQUIRED ,
1918 ERR_TRACE_EVENTS_UNAVAILABLE ,
20- ERR_INVALID_ARG_TYPE
2119} = require ( 'internal/errors' ) . codes ;
2220
2321const { ownsProcessState } = require ( 'internal/worker' ) ;
@@ -29,6 +27,7 @@ const { customInspectSymbol } = require('internal/util');
2927const { format } = require ( 'internal/util/inspect' ) ;
3028const {
3129 validateObject,
30+ validateStringArray,
3231} = require ( 'internal/validators' ) ;
3332
3433const enabledTracingObjects = new SafeSet ( ) ;
@@ -84,11 +83,7 @@ class Tracing {
8483
8584function createTracing ( options ) {
8685 validateObject ( options , 'options' ) ;
87-
88- if ( ! ArrayIsArray ( options . categories ) ) {
89- throw new ERR_INVALID_ARG_TYPE ( 'options.categories' , 'string[]' ,
90- options . categories ) ;
91- }
86+ validateStringArray ( options . categories , 'options.categories' ) ;
9287
9388 if ( options . categories . length <= 0 )
9489 throw new ERR_TRACE_EVENTS_CATEGORY_REQUIRED ( ) ;
You can’t perform that action at this time.
0 commit comments