(str, isLegacyOctalNumericLiteral)
| 5761 | }; |
| 5762 | |
| 5763 | function stringToNumber(str, isLegacyOctalNumericLiteral) { |
| 5764 | if (isLegacyOctalNumericLiteral) { |
| 5765 | return parseInt(str, 8) |
| 5766 | } |
| 5767 | |
| 5768 | // `parseFloat(value)` stops parsing at the first numeric separator then returns a wrong value. |
| 5769 | return parseFloat(str.replace(/_/g, "")) |
| 5770 | } |
| 5771 | |
| 5772 | function stringToBigInt(str) { |
| 5773 | if (typeof BigInt !== "function") { |