File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ const {
4646 RegExp,
4747 RegExpPrototypeTest,
4848 RegExpPrototypeToString,
49+ SafeArrayIterator,
4950 SafeStringIterator,
5051 SafeMap,
5152 SafeSet,
@@ -1870,18 +1871,19 @@ function tryStringify(arg) {
18701871}
18711872
18721873function format ( ...args ) {
1873- return formatWithOptionsInternal ( undefined , args ) ;
1874+ return formatWithOptionsInternal ( undefined , ... new SafeArrayIterator ( args ) ) ;
18741875}
18751876
18761877function formatWithOptions ( inspectOptions , ...args ) {
18771878 if ( typeof inspectOptions !== 'object' || inspectOptions === null ) {
18781879 throw new ERR_INVALID_ARG_TYPE (
18791880 'inspectOptions' , 'object' , inspectOptions ) ;
18801881 }
1881- return formatWithOptionsInternal ( inspectOptions , args ) ;
1882+ return formatWithOptionsInternal ( inspectOptions ,
1883+ ...new SafeArrayIterator ( args ) ) ;
18821884}
18831885
1884- function formatWithOptionsInternal ( inspectOptions , args ) {
1886+ function formatWithOptionsInternal ( inspectOptions , ... args ) {
18851887 const first = args [ 0 ] ;
18861888 let a = 0 ;
18871889 let str = '' ;
You can’t perform that action at this time.
0 commit comments