| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 34e4c8c commit 748d4f6
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,6 @@ const { | |||
| 111 | 111 | StringPrototypeSplit, | |
| 112 | 112 | StringPrototypeStartsWith, | |
| 113 | 113 | StringPrototypeToLowerCase, | |
| 114 | - StringPrototypeTrim, | ||
| 115 | 114 | StringPrototypeValueOf, | |
| 116 | 115 | SymbolIterator, | |
| 117 | 116 | SymbolPrototypeToString, | |
@@ -972,6 +971,7 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { | |||
| 972 | 971 | const filter = ctx.showHidden ? ALL_PROPERTIES : ONLY_ENUMERABLE; | |
| 973 | 972 | ||
| 974 | 973 | let extrasType = kObjectType; | |
| 974 | + let extraKeys; | ||
| 975 | 975 | ||
| 976 | 976 | // Iterators and the rest are split to reduce checks. | |
| 977 | 977 | // We have to check all values in case the constructor is set to null. | |
@@ -1027,6 +1027,11 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { | |||
| 1027 | 1027 | // bound function is required to reconstruct missing information. | |
| 1028 | 1028 | formatter = FunctionPrototypeBind(formatTypedArray, null, bound, size); | |
| 1029 | 1029 | extrasType = kArrayExtrasType; | |
| 1030 | + | ||
| 1031 | + if (ctx.showHidden) { | ||
| 1032 | + extraKeys = ['BYTES_PER_ELEMENT', 'length', 'byteLength', 'byteOffset', 'buffer']; | ||
| 1033 | + typedArray = true; | ||
| 1034 | + } | ||
| 1030 | 1035 | } else if (isMapIterator(value)) { | |
| 1031 | 1036 | keys = getKeys(value, ctx.showHidden); | |
| 1032 | 1037 | braces = getIteratorBraces('Map', tag); | |
@@ -1095,14 +1100,14 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { | |||
| 1095 | 1100 | formatter = formatArrayBuffer; | |
| 1096 | 1101 | } else if (keys.length === 0 && protoProps === undefined) { | |
| 1097 | 1102 | return prefix + | |
| 1098 | - `{ byteLength: ${formatNumber(ctx.stylize, value.byteLength, false)} }`; | ||
| 1103 | + `{ [byteLength]: ${formatNumber(ctx.stylize, value.byteLength, false)} }`; | ||
| 1099 | 1104 | } | |
| 1100 | 1105 | braces[0] = `${prefix}{`; | |
| 1101 | - ArrayPrototypeUnshift(keys, 'byteLength'); | ||
| 1106 | + extraKeys = ['byteLength']; | ||
| 1102 | 1107 | } else if (isDataView(value)) { | |
| 1103 | 1108 | braces[0] = `${getPrefix(constructor, tag, 'DataView')}{`; | |
| 1104 | 1109 | // .buffer goes last, it's not a primitive like the others. | |
| 1105 | - ArrayPrototypeUnshift(keys, 'byteLength', 'byteOffset', 'buffer'); | ||
| 1110 | + extraKeys = ['byteLength', 'byteOffset', 'buffer']; | ||
| 1106 | 1111 | } else if (isPromise(value)) { | |
| 1107 | 1112 | braces[0] = `${getPrefix(constructor, tag, 'Promise')}{`; | |
| 1108 | 1113 | formatter = formatPromise; | |
@@ -1152,6 +1157,18 @@ function formatRaw(ctx, value, recurseTimes, typedArray) { | |||
| 1152 | 1157 | const indentationLvl = ctx.indentationLvl; | |
| 1153 | 1158 | try { | |
| 1154 | 1159 | output = formatter(ctx, value, recurseTimes); | |
| 1160 | + if (extraKeys !== undefined) { | ||
| 1161 | + for (i = 0; i < extraKeys.length; i++) { | ||
| 1162 | + let formatted; | ||
| 1163 | + try { | ||
| 1164 | + formatted = formatExtraProperties(ctx, value, recurseTimes, extraKeys[i], typedArray); | ||
| 1165 | + } catch { | ||
| 1166 | + const tempValue = { [extraKeys[i]]: value.buffer[extraKeys[i]] }; | ||
| 1167 | + formatted = formatExtraProperties(ctx, tempValue, recurseTimes, extraKeys[i], typedArray); | ||
| 1168 | + } | ||
| 1169 | + ArrayPrototypePush(output, formatted); | ||
| 1170 | + } | ||
| 1171 | + } | ||
| 1155 | 1172 | for (i = 0; i < keys.length; i++) { | |
| 1156 | 1173 | ArrayPrototypePush( | |
| 1157 | 1174 | output, | |
@@ -2011,11 +2028,15 @@ function formatArrayBuffer(ctx, value) { | |||
| 2011 | 2028 | } | |
| 2012 | 2029 | if (hexSlice === undefined) | |
| 2013 | 2030 | hexSlice = uncurryThis(require('buffer').Buffer.prototype.hexSlice); | |
| 2014 | - let str = StringPrototypeTrim(RegExpPrototypeSymbolReplace( | ||
| 2015 | - /(.{2})/g, | ||
| 2016 | - hexSlice(buffer, 0, MathMin(ctx.maxArrayLength, buffer.length)), | ||
| 2017 | - '$1 ', | ||
| 2018 | - )); | ||
| 2031 | + const rawString = hexSlice(buffer, 0, MathMin(ctx.maxArrayLength, buffer.length)); | ||
| 2032 | + let str = ''; | ||
| 2033 | + let i = 0; | ||
| 2034 | + for (; i < rawString.length - 2; i += 2) { | ||
| 2035 | + str += `${rawString[i]}${rawString[i + 1]} `; | ||
| 2036 | + } | ||
| 2037 | + if (rawString.length > 0) { | ||
| 2038 | + str += `${rawString[i]}${rawString[i + 1]}`; | ||
| 2039 | + } | ||
| 2019 | 2040 | const remaining = buffer.length - ctx.maxArrayLength; | |
| 2020 | 2041 | if (remaining > 0) | |
| 2021 | 2042 | str += ` ... ${remaining} more byte${remaining > 1 ? 's' : ''}`; | |
@@ -2042,7 +2063,7 @@ function formatArray(ctx, value, recurseTimes) { | |||
| 2042 | 2063 | return output; | |
| 2043 | 2064 | } | |
| 2044 | 2065 | ||
| 2045 | - function formatTypedArray(value, length, ctx, ignored, recurseTimes) { | ||
| 2066 | + function formatTypedArray(value, length, ctx) { | ||
| 2046 | 2067 | const maxLength = MathMin(MathMax(0, ctx.maxArrayLength), length); | |
| 2047 | 2068 | const remaining = value.length - maxLength; | |
| 2048 | 2069 | const output = new Array(maxLength); | |
@@ -2055,22 +2076,6 @@ function formatTypedArray(value, length, ctx, ignored, recurseTimes) { | |||
| 2055 | 2076 | if (remaining > 0) { | |
| 2056 | 2077 | output[maxLength] = remainingText(remaining); | |
| 2057 | 2078 | } | |
| 2058 | - if (ctx.showHidden) { | ||
| 2059 | - // .buffer goes last, it's not a primitive like the others. | ||
| 2060 | - // All besides `BYTES_PER_ELEMENT` are actually getters. | ||
| 2061 | - ctx.indentationLvl += 2; | ||
| 2062 | - for (const key of [ | ||
| 2063 | - 'BYTES_PER_ELEMENT', | ||
| 2064 | - 'length', | ||
| 2065 | - 'byteLength', | ||
| 2066 | - 'byteOffset', | ||
| 2067 | - 'buffer', | ||
| 2068 | - ]) { | ||
| 2069 | - const str = formatValue(ctx, value[key], recurseTimes, true); | ||
| 2070 | - ArrayPrototypePush(output, `[${key}]: ${str}`); | ||
| 2071 | - } | ||
| 2072 | - ctx.indentationLvl -= 2; | ||
| 2073 | - } | ||
| 2074 | 2079 | return output; | |
| 2075 | 2080 | } | |
| 2076 | 2081 | ||
@@ -2218,12 +2223,20 @@ function formatPromise(ctx, value, recurseTimes) { | |||
| 2218 | 2223 | return output; | |
| 2219 | 2224 | } | |
| 2220 | 2225 | ||
| 2226 | + function formatExtraProperties(ctx, value, recurseTimes, key, typedArray) { | ||
| 2227 | + ctx.indentationLvl += 2; | ||
| 2228 | + const str = formatValue(ctx, value[key], recurseTimes, typedArray); | ||
| 2229 | + ctx.indentationLvl -= 2; | ||
| 2230 | + | ||
| 2231 | + // These entries are mainly getters. Should they be formatted like getters? | ||
| 2232 | + return ctx.stylize(`[${key}]: ${str}`, 'string'); | ||
| 2233 | + } | ||
| 2234 | + | ||
| 2221 | 2235 | function formatProperty(ctx, value, recurseTimes, key, type, desc, | |
| 2222 | 2236 | original = value) { | |
| 2223 | 2237 | let name, str; | |
| 2224 | 2238 | let extra = ' '; | |
| 2225 | - desc ||= ObjectGetOwnPropertyDescriptor(value, key) || | ||
| 2226 | - { value: value[key], enumerable: true }; | ||
| 2239 | + desc ??= ObjectGetOwnPropertyDescriptor(value, key); | ||
| 2227 | 2240 | if (desc.value !== undefined) { | |
| 2228 | 2241 | const diff = (ctx.compact !== true || type !== kObjectType) ? 2 : 3; | |
| 2229 | 2242 | ctx.indentationLvl += diff; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -588,7 +588,7 @@ assert.strictEqual( | |||
| 588 | 588 | ||
| 589 | 589 | assert.strictEqual( | |
| 590 | 590 | util.format(new SharedArrayBuffer(4)), | |
| 591 | - 'SharedArrayBuffer { [Uint8Contents]: <00 00 00 00>, byteLength: 4 }' | ||
| 591 | + 'SharedArrayBuffer { [Uint8Contents]: <00 00 00 00>, [byteLength]: 4 }' | ||
| 592 | 592 | ); | |
| 593 | 593 | ||
| 594 | 594 | assert.strictEqual( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -172,56 +172,67 @@ assert.doesNotMatch( | |||
| 172 | 172 | const dv = new DataView(ab, 1, 2); | |
| 173 | 173 | assert.strictEqual( | |
| 174 | 174 | util.inspect(ab, showHidden), | |
| 175 | - 'ArrayBuffer { [Uint8Contents]: <01 02 03 04>, byteLength: 4 }' | ||
| 175 | + 'ArrayBuffer { [Uint8Contents]: <01 02 03 04>, [byteLength]: 4 }' | ||
| 176 | 176 | ); | |
| 177 | 177 | assert.strictEqual(util.inspect(new DataView(ab, 1, 2), showHidden), | |
| 178 | 178 | 'DataView {\n' + | |
| 179 | - ' byteLength: 2,\n' + | ||
| 180 | - ' byteOffset: 1,\n' + | ||
| 181 | - ' buffer: ArrayBuffer {' + | ||
| 182 | - ' [Uint8Contents]: <01 02 03 04>, byteLength: 4 }\n}'); | ||
| 179 | + ' [byteLength]: 2,\n' + | ||
| 180 | + ' [byteOffset]: 1,\n' + | ||
| 181 | + ' [buffer]: ArrayBuffer {' + | ||
| 182 | + ' [Uint8Contents]: <01 02 03 04>, [byteLength]: 4 }\n}'); | ||
| 183 | 183 | assert.strictEqual( | |
| 184 | 184 | util.inspect(ab, showHidden), | |
| 185 | - 'ArrayBuffer { [Uint8Contents]: <01 02 03 04>, byteLength: 4 }' | ||
| 185 | + 'ArrayBuffer { [Uint8Contents]: <01 02 03 04>, [byteLength]: 4 }' | ||
| 186 | 186 | ); | |
| 187 | 187 | assert.strictEqual(util.inspect(dv, showHidden), | |
| 188 | 188 | 'DataView {\n' + | |
| 189 | - ' byteLength: 2,\n' + | ||
| 190 | - ' byteOffset: 1,\n' + | ||
| 191 | - ' buffer: ArrayBuffer { [Uint8Contents]: ' + | ||
| 192 | - '<01 02 03 04>, byteLength: 4 }\n}'); | ||
| 189 | + ' [byteLength]: 2,\n' + | ||
| 190 | + ' [byteOffset]: 1,\n' + | ||
| 191 | + ' [buffer]: ArrayBuffer { [Uint8Contents]: ' + | ||
| 192 | + '<01 02 03 04>, [byteLength]: 4 }\n}'); | ||
| 193 | 193 | ab.x = 42; | |
| 194 | 194 | dv.y = 1337; | |
| 195 | 195 | assert.strictEqual(util.inspect(ab, showHidden), | |
| 196 | 196 | 'ArrayBuffer { [Uint8Contents]: <01 02 03 04>, ' + | |
| 197 | - 'byteLength: 4, x: 42 }'); | ||
| 198 | - assert.strictEqual(util.inspect(dv, showHidden), | ||
| 197 | + '[byteLength]: 4, x: 42 }'); | ||
| 198 | + assert.strictEqual(util.inspect(dv, { showHidden, breakLength: 82 }), | ||
| 199 | 199 | 'DataView {\n' + | |
| 200 | - ' byteLength: 2,\n' + | ||
| 201 | - ' byteOffset: 1,\n' + | ||
| 202 | - ' buffer: ArrayBuffer { [Uint8Contents]: <01 02 03 04>,' + | ||
| 203 | - ' byteLength: 4, x: 42 },\n' + | ||
| 200 | + ' [byteLength]: 2,\n' + | ||
| 201 | + ' [byteOffset]: 1,\n' + | ||
| 202 | + ' [buffer]: ArrayBuffer { [Uint8Contents]: <01 02 03 04>,' + | ||
| 203 | + ' [byteLength]: 4, x: 42 },\n' + | ||
| 204 | 204 | ' y: 1337\n}'); | |
| 205 | 205 | } | |
| 206 | 206 | ||
| 207 | 207 | { | |
| 208 | 208 | const ab = new ArrayBuffer(42); | |
| 209 | + const dv = new DataView(ab); | ||
| 210 | + | ||
| 209 | 211 | assert.strictEqual(ab.byteLength, 42); | |
| 210 | 212 | new MessageChannel().port1.postMessage(ab, [ ab ]); | |
| 211 | 213 | assert.strictEqual(ab.byteLength, 0); | |
| 212 | 214 | assert.strictEqual(util.inspect(ab), | |
| 213 | - 'ArrayBuffer { (detached), byteLength: 0 }'); | ||
| 215 | + 'ArrayBuffer { (detached), [byteLength]: 0 }'); | ||
| 216 | + | ||
| 217 | + assert.strictEqual( | ||
| 218 | + util.inspect(dv), | ||
| 219 | + 'DataView {\n' + | ||
| 220 | + ' [byteLength]: 0,\n' + | ||
| 221 | + ' [byteOffset]: undefined,\n' + | ||
| 222 | + ' [buffer]: ArrayBuffer { (detached), [byteLength]: 0 }\n' + | ||
| 223 | + ' }', | ||
| 224 | + ); | ||
| 214 | 225 | } | |
| 215 | 226 | ||
| 216 | 227 | // Truncate output for ArrayBuffers using plural or singular bytes | |
| 217 | 228 | { | |
| 218 | 229 | const ab = new ArrayBuffer(3); | |
| 219 | - assert.strictEqual(util.inspect(ab, { showHidden: true, maxArrayLength: 2 }), | ||
| 230 | + assert.strictEqual(util.inspect(ab, { showHidden: true, maxArrayLength: 2, breakLength: 82 }), | ||
| 220 | 231 | 'ArrayBuffer { [Uint8Contents]' + | |
| 221 | - ': <00 00 ... 1 more byte>, byteLength: 3 }'); | ||
| 222 | - assert.strictEqual(util.inspect(ab, { showHidden: true, maxArrayLength: 1 }), | ||
| 232 | + ': <00 00 ... 1 more byte>, [byteLength]: 3 }'); | ||
| 233 | + assert.strictEqual(util.inspect(ab, { showHidden: true, maxArrayLength: 1, breakLength: 82 }), | ||
| 223 | 234 | 'ArrayBuffer { [Uint8Contents]' + | |
| 224 | - ': <00 ... 2 more bytes>, byteLength: 3 }'); | ||
| 235 | + ': <00 ... 2 more bytes>, [byteLength]: 3 }'); | ||
| 225 | 236 | } | |
| 226 | 237 | ||
| 227 | 238 | // Now do the same checks but from a different context. | |
@@ -231,35 +242,35 @@ assert.doesNotMatch( | |||
| 231 | 242 | const dv = vm.runInNewContext('new DataView(ab, 1, 2)', { ab }); | |
| 232 | 243 | assert.strictEqual( | |
| 233 | 244 | util.inspect(ab, showHidden), | |
| 234 | - 'ArrayBuffer { [Uint8Contents]: <00 00 00 00>, byteLength: 4 }' | ||
| 245 | + 'ArrayBuffer { [Uint8Contents]: <00 00 00 00>, [byteLength]: 4 }' | ||
| 235 | 246 | ); | |
| 236 | 247 | assert.strictEqual(util.inspect(new DataView(ab, 1, 2), showHidden), | |
| 237 | 248 | 'DataView {\n' + | |
| 238 | - ' byteLength: 2,\n' + | ||
| 239 | - ' byteOffset: 1,\n' + | ||
| 240 | - ' buffer: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 241 | - ' byteLength: 4 }\n}'); | ||
| 249 | + ' [byteLength]: 2,\n' + | ||
| 250 | + ' [byteOffset]: 1,\n' + | ||
| 251 | + ' [buffer]: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 252 | + ' [byteLength]: 4 }\n}'); | ||
| 242 | 253 | assert.strictEqual( | |
| 243 | 254 | util.inspect(ab, showHidden), | |
| 244 | - 'ArrayBuffer { [Uint8Contents]: <00 00 00 00>, byteLength: 4 }' | ||
| 255 | + 'ArrayBuffer { [Uint8Contents]: <00 00 00 00>, [byteLength]: 4 }' | ||
| 245 | 256 | ); | |
| 246 | 257 | assert.strictEqual(util.inspect(dv, showHidden), | |
| 247 | 258 | 'DataView {\n' + | |
| 248 | - ' byteLength: 2,\n' + | ||
| 249 | - ' byteOffset: 1,\n' + | ||
| 250 | - ' buffer: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 251 | - ' byteLength: 4 }\n}'); | ||
| 259 | + ' [byteLength]: 2,\n' + | ||
| 260 | + ' [byteOffset]: 1,\n' + | ||
| 261 | + ' [buffer]: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 262 | + ' [byteLength]: 4 }\n}'); | ||
| 252 | 263 | ab.x = 42; | |
| 253 | 264 | dv.y = 1337; | |
| 254 | 265 | assert.strictEqual(util.inspect(ab, showHidden), | |
| 255 | 266 | 'ArrayBuffer { [Uint8Contents]: <00 00 00 00>, ' + | |
| 256 | - 'byteLength: 4, x: 42 }'); | ||
| 257 | - assert.strictEqual(util.inspect(dv, showHidden), | ||
| 267 | + '[byteLength]: 4, x: 42 }'); | ||
| 268 | + assert.strictEqual(util.inspect(dv, { showHidden, breakLength: 82 }), | ||
| 258 | 269 | 'DataView {\n' + | |
| 259 | - ' byteLength: 2,\n' + | ||
| 260 | - ' byteOffset: 1,\n' + | ||
| 261 | - ' buffer: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 262 | - ' byteLength: 4, x: 42 },\n' + | ||
| 270 | + ' [byteLength]: 2,\n' + | ||
| 271 | + ' [byteOffset]: 1,\n' + | ||
| 272 | + ' [buffer]: ArrayBuffer { [Uint8Contents]: <00 00 00 00>,' + | ||
| 273 | + ' [byteLength]: 4, x: 42 },\n' + | ||
| 263 | 274 | ' y: 1337\n}'); | |
| 264 | 275 | } | |
| 265 | 276 | ||
@@ -286,7 +297,7 @@ assert.doesNotMatch( | |||
| 286 | 297 | ` [length]: ${length},\n` + | |
| 287 | 298 | ` [byteLength]: ${byteLength},\n` + | |
| 288 | 299 | ' [byteOffset]: 0,\n' + | |
| 289 | - ` [buffer]: ArrayBuffer { byteLength: ${byteLength} }\n]`); | ||
| 300 | + ` [buffer]: ArrayBuffer { [byteLength]: ${byteLength} }\n]`); | ||
| 290 | 301 | assert.strictEqual( | |
| 291 | 302 | util.inspect(array, false), | |
| 292 | 303 | `${constructor.name}(${length}) [ 65, 97 ]` | |
@@ -320,7 +331,7 @@ assert.doesNotMatch( | |||
| 320 | 331 | ` [length]: ${length},\n` + | |
| 321 | 332 | ` [byteLength]: ${byteLength},\n` + | |
| 322 | 333 | ' [byteOffset]: 0,\n' + | |
| 323 | - ` [buffer]: ArrayBuffer { byteLength: ${byteLength} }\n]`); | ||
| 334 | + ` [buffer]: ArrayBuffer { [byteLength]: ${byteLength} }\n]`); | ||
| 324 | 335 | assert.strictEqual( | |
| 325 | 336 | util.inspect(array, false), | |
| 326 | 337 | `${constructor.name}(${length}) [ 65, 97 ]` | |
@@ -1837,7 +1848,7 @@ util.inspect(process); | |||
| 1837 | 1848 | ' [byteLength]: 0,', | |
| 1838 | 1849 | ' [byteOffset]: 0,', | |
| 1839 | 1850 | ' [buffer]: ArrayBuffer {', | |
| 1840 | - ' byteLength: 0,', | ||
| 1851 | + ' [byteLength]: 0,', | ||
| 1841 | 1852 | ' foo: true', | |
| 1842 | 1853 | ' }', | |
| 1843 | 1854 | ' ],', | |
@@ -1855,7 +1866,7 @@ util.inspect(process); | |||
| 1855 | 1866 | ' [byteLength]: 0,', | |
| 1856 | 1867 | ' [byteOffset]: 0,', | |
| 1857 | 1868 | ' [buffer]: ArrayBuffer {', | |
| 1858 | - ' byteLength: 0,', | ||
| 1869 | + ' [byteLength]: 0,', | ||
| 1859 | 1870 | ' foo: true', | |
| 1860 | 1871 | ' }', | |
| 1861 | 1872 | ' ],', | |
@@ -1885,7 +1896,7 @@ util.inspect(process); | |||
| 1885 | 1896 | ' [length]: 0,', | |
| 1886 | 1897 | ' [byteLength]: 0,', | |
| 1887 | 1898 | ' [byteOffset]: 0,', | |
| 1888 | - ' [buffer]: ArrayBuffer { byteLength: 0, foo: true }', | ||
| 1899 | + ' [buffer]: ArrayBuffer { [byteLength]: 0, foo: true }', | ||
| 1889 | 1900 | ' ],', | |
| 1890 | 1901 | ' [Set Iterator] {', | |
| 1891 | 1902 | ' [ 1, 2, [length]: 2 ],', | |
@@ -1896,7 +1907,7 @@ util.inspect(process); | |||
| 1896 | 1907 | ' [length]: 0,', | |
| 1897 | 1908 | ' [byteLength]: 0,', | |
| 1898 | 1909 | ' [byteOffset]: 0,', | |
| 1899 | - ' [buffer]: ArrayBuffer { byteLength: 0, foo: true }', | ||
| 1910 | + ' [buffer]: ArrayBuffer { [byteLength]: 0, foo: true }', | ||
| 1900 | 1911 | ' ],', | |
| 1901 | 1912 | ' [Circular *1],', | |
| 1902 | 1913 | " [Symbol(Symbol.toStringTag)]: 'Map Iterator'", | |
@@ -1924,7 +1935,7 @@ util.inspect(process); | |||
| 1924 | 1935 | ' [byteLength]: 0,', | |
| 1925 | 1936 | ' [byteOffset]: 0,', | |
| 1926 | 1937 | ' [buffer]: ArrayBuffer {', | |
| 1927 | - ' byteLength: 0,', | ||
| 1938 | + ' [byteLength]: 0,', | ||
| 1928 | 1939 | ' foo: true } ],', | |
| 1929 | 1940 | ' [Set Iterator] {', | |
| 1930 | 1941 | ' [ 1,', | |
@@ -1938,7 +1949,7 @@ util.inspect(process); | |||
| 1938 | 1949 | ' [byteLength]: 0,', | |
| 1939 | 1950 | ' [byteOffset]: 0,', | |
| 1940 | 1951 | ' [buffer]: ArrayBuffer {', | |
| 1941 | - ' byteLength: 0,', | ||
| 1952 | + ' [byteLength]: 0,', | ||
| 1942 | 1953 | ' foo: true } ],', | |
| 1943 | 1954 | ' [Circular *1],', | |
| 1944 | 1955 | ' [Symbol(Symbol.toStringTag)]:', | |
@@ -2244,12 +2255,12 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'"); | |||
| 2244 | 2255 | [new BigUint64Array(2), '[BigUint64Array(2): null prototype] [ 0n, 0n ]'], | |
| 2245 | 2256 | [new ArrayBuffer(16), '[ArrayBuffer: null prototype] {\n' + | |
| 2246 | 2257 | ' [Uint8Contents]: <00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>,\n' + | |
| 2247 | - ' byteLength: undefined\n}'], | ||
| 2258 | + ' [byteLength]: undefined\n}'], | ||
| 2248 | 2259 | [new DataView(new ArrayBuffer(16)), | |
| 2249 | - '[DataView: null prototype] {\n byteLength: undefined,\n ' + | ||
| 2250 | - 'byteOffset: undefined,\n buffer: undefined\n}'], | ||
| 2260 | + '[DataView: null prototype] {\n [byteLength]: undefined,\n ' + | ||
| 2261 | + '[byteOffset]: undefined,\n [buffer]: undefined\n}'], | ||
| 2251 | 2262 | [new SharedArrayBuffer(2), '[SharedArrayBuffer: null prototype] ' + | |
| 2252 | - '{\n [Uint8Contents]: <00 00>,\n byteLength: undefined\n}'], | ||
| 2263 | + '{\n [Uint8Contents]: <00 00>,\n [byteLength]: undefined\n}'], | ||
| 2253 | 2264 | [/foobar/, '[RegExp: null prototype] /foobar/'], | |
| 2254 | 2265 | [new Date('Sun, 14 Feb 2010 11:48:40 GMT'), | |
| 2255 | 2266 | '[Date: null prototype] 2010-02-14T11:48:40.000Z'], | |
@@ -3632,7 +3643,7 @@ assert.strictEqual( | |||
| 3632 | 3643 | assert.strictEqual( | |
| 3633 | 3644 | util.inspect(o), | |
| 3634 | 3645 | '{\n' + | |
| 3635 | - ' arrayBuffer: ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 },\n' + | ||
| 3646 | + ' arrayBuffer: ArrayBuffer { [Uint8Contents]: <>, [byteLength]: 0 },\n' + | ||
| 3636 | 3647 | ' buffer: <Buffer 48 65 6c 6c 6f>,\n' + | |
| 3637 | 3648 | ' typedArray: TypedArray(5) [Uint8Array] [ 72, 101, 108, 108, 111 ],\n' + | |
| 3638 | 3649 | ' array: [],\n' + | |
| Back | FazBrowse Home | New Git URL |
0 commit comments