|
360 | 360 | ObjectKeys(value).length > 0 ||
|
361 | 361 | ObjectGetOwnPropertySymbols(value).length > 0
|
362 | 362 | ) {
|
363 |
| - const [propString, refIndex] = inspectRawObject( |
| 363 | + const { 0: propString, 1: refIndex } = inspectRawObject( |
364 | 364 | value,
|
365 | 365 | inspectOptions,
|
366 | 366 | );
|
|
847 | 847 | displayName: "",
|
848 | 848 | delims: ["[", "]"],
|
849 | 849 | entryHandler: (entry, inspectOptions) => {
|
850 |
| - const [index, val] = entry; |
| 850 | + const { 0: index, 1: val } = entry; |
851 | 851 | let i = index;
|
852 | 852 | lastValidIndex = index;
|
853 | 853 | if (!ObjectPrototypeHasOwnProperty(value, i)) {
|
|
940 | 940 | displayName: "Map",
|
941 | 941 | delims: ["{", "}"],
|
942 | 942 | entryHandler: (entry, inspectOptions) => {
|
943 |
| - const [key, val] = entry; |
| 943 | + const { 0: key, 1: val } = entry; |
944 | 944 | inspectOptions.indentLevel++;
|
945 | 945 | const inspectedValue = `${
|
946 | 946 | inspectValueWithQuotes(key, inspectOptions)
|
|
1100 | 1100 | const cyan = maybeColor(colors.cyan, inspectOptions);
|
1101 | 1101 | const red = maybeColor(colors.red, inspectOptions);
|
1102 | 1102 |
|
1103 |
| - const [state, result] = core.getPromiseDetails(value); |
| 1103 | + const { 0: state, 1: result } = core.getPromiseDetails(value); |
1104 | 1104 |
|
1105 | 1105 | if (state === PromiseState.Pending) {
|
1106 | 1106 | return `Promise { ${cyan("<pending>")} }`;
|
|
1363 | 1363 | );
|
1364 | 1364 | } else {
|
1365 | 1365 | // Otherwise, default object formatting
|
1366 |
| - let [insp, refIndex] = inspectRawObject(value, inspectOptions); |
| 1366 | + let { 0: insp, 1: refIndex } = inspectRawObject(value, inspectOptions); |
1367 | 1367 | insp = refIndex + insp;
|
1368 | 1368 | return insp;
|
1369 | 1369 | }
|
|
1568 | 1568 | let g_;
|
1569 | 1569 | let b_;
|
1570 | 1570 | if (h < 60) {
|
1571 |
| - [r_, g_, b_] = [c, x, 0]; |
| 1571 | + ({ 0: r_, 1: g_, 2: b_ } = [c, x, 0]); |
1572 | 1572 | } else if (h < 120) {
|
1573 |
| - [r_, g_, b_] = [x, c, 0]; |
| 1573 | + ({ 0: r_, 1: g_, 2: b_ } = [x, c, 0]); |
1574 | 1574 | } else if (h < 180) {
|
1575 |
| - [r_, g_, b_] = [0, c, x]; |
| 1575 | + ({ 0: r_, 1: g_, 2: b_ } = [0, c, x]); |
1576 | 1576 | } else if (h < 240) {
|
1577 |
| - [r_, g_, b_] = [0, x, c]; |
| 1577 | + ({ 0: r_, 1: g_, 2: b_ } = [0, x, c]); |
1578 | 1578 | } else if (h < 300) {
|
1579 |
| - [r_, g_, b_] = [x, 0, c]; |
| 1579 | + ({ 0: r_, 1: g_, 2: b_ } = [x, 0, c]); |
1580 | 1580 | } else {
|
1581 |
| - [r_, g_, b_] = [c, 0, x]; |
| 1581 | + ({ 0: r_, 1: g_, 2: b_ } = [c, 0, x]); |
1582 | 1582 | }
|
1583 | 1583 | return [
|
1584 | 1584 | MathRound((r_ + m) * 255),
|
|
1645 | 1645 | }
|
1646 | 1646 |
|
1647 | 1647 | for (let i = 0; i < rawEntries.length; ++i) {
|
1648 |
| - const [key, value] = rawEntries[i]; |
| 1648 | + const { 0: key, 1: value } = rawEntries[i]; |
1649 | 1649 | if (key == "background-color") {
|
1650 | 1650 | if (value != null) {
|
1651 | 1651 | css.backgroundColor = value;
|
|
1736 | 1736 | ansi += `\x1b[47m`;
|
1737 | 1737 | } else {
|
1738 | 1738 | if (ArrayIsArray(css.backgroundColor)) {
|
1739 |
| - const [r, g, b] = css.backgroundColor; |
| 1739 | + const { 0: r, 1: g, 2: b } = css.backgroundColor; |
1740 | 1740 | ansi += `\x1b[48;2;${r};${g};${b}m`;
|
1741 | 1741 | } else {
|
1742 | 1742 | const parsed = parseCssColor(css.backgroundColor);
|
1743 | 1743 | if (parsed !== null) {
|
1744 |
| - const [r, g, b] = parsed; |
| 1744 | + const { 0: r, 1: g, 2: b } = parsed; |
1745 | 1745 | ansi += `\x1b[48;2;${r};${g};${b}m`;
|
1746 | 1746 | } else {
|
1747 | 1747 | ansi += "\x1b[49m";
|
|
1770 | 1770 | ansi += `\x1b[37m`;
|
1771 | 1771 | } else {
|
1772 | 1772 | if (ArrayIsArray(css.color)) {
|
1773 |
| - const [r, g, b] = css.color; |
| 1773 | + const { 0: r, 1: g, 2: b } = css.color; |
1774 | 1774 | ansi += `\x1b[38;2;${r};${g};${b}m`;
|
1775 | 1775 | } else {
|
1776 | 1776 | const parsed = parseCssColor(css.color);
|
1777 | 1777 | if (parsed !== null) {
|
1778 |
| - const [r, g, b] = parsed; |
| 1778 | + const { 0: r, 1: g, 2: b } = parsed; |
1779 | 1779 | ansi += `\x1b[38;2;${r};${g};${b}m`;
|
1780 | 1780 | } else {
|
1781 | 1781 | ansi += "\x1b[39m";
|
|
1799 | 1799 | }
|
1800 | 1800 | if (!colorEquals(css.textDecorationColor, prevCss.textDecorationColor)) {
|
1801 | 1801 | if (css.textDecorationColor != null) {
|
1802 |
| - const [r, g, b] = css.textDecorationColor; |
| 1802 | + const { 0: r, 1: g, 2: b } = css.textDecorationColor; |
1803 | 1803 | ansi += `\x1b[58;2;${r};${g};${b}m`;
|
1804 | 1804 | } else {
|
1805 | 1805 | ansi += "\x1b[59m";
|
|
2045 | 2045 | return;
|
2046 | 2046 | }
|
2047 | 2047 |
|
2048 |
| - const [first, ...rest] = args; |
| 2048 | + const [first, ...rest] = new SafeArrayIterator(args); |
2049 | 2049 |
|
2050 | 2050 | if (typeof first === "string") {
|
2051 | 2051 | this.error(
|
|
0 commit comments