| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8432d65 commit f32aec8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -104,9 +104,6 @@ const { | |||
| 104 | 104 | } = require('internal/util'); | |
| 105 | 105 | ||
| 106 | 106 | const { | |
| 107 | - codes: { | ||
| 108 | - ERR_INVALID_ARG_TYPE | ||
| 109 | - }, | ||
| 110 | 107 | isStackOverflowError | |
| 111 | 108 | } = require('internal/errors'); | |
| 112 | 109 | ||
@@ -2101,10 +2098,7 @@ function format(...args) { | |||
| 2101 | 2098 | } | |
| 2102 | 2099 | ||
| 2103 | 2100 | function formatWithOptions(inspectOptions, ...args) { | |
| 2104 | - if (typeof inspectOptions !== 'object' || inspectOptions === null) { | ||
| 2105 | - throw new ERR_INVALID_ARG_TYPE( | ||
| 2106 | - 'inspectOptions', 'object', inspectOptions); | ||
| 2107 | - } | ||
| 2101 | + validateObject(inspectOptions, 'inspectOptions', { allowArray: true }); | ||
| 2108 | 2102 | return formatWithOptionsInternal(inspectOptions, args); | |
| 2109 | 2103 | } | |
| 2110 | 2104 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments