Thanks to visit codestin.com Credit goes to github.com
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.
1 parent 8432d65 commit f32aec8Copy full SHA for f32aec8
lib/internal/util/inspect.js
@@ -104,9 +104,6 @@ const {
104
} = require('internal/util');
105
106
const {
107
- codes: {
108
- ERR_INVALID_ARG_TYPE
109
- },
110
isStackOverflowError
111
} = require('internal/errors');
112
@@ -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
- }
+ validateObject(inspectOptions, 'inspectOptions', { allowArray: true });
2108
return formatWithOptionsInternal(inspectOptions, args);
2109
2110
0 commit comments