Problem
The owned StringToBigInt paths trim only ASCII whitespace plus U+00A0 and U+FEFF. ECMA-262 StrWhiteSpace also includes U+1680, U+2000 through U+200A, U+2028, U+2029, U+202F, U+205F, and U+3000.
This makes the same valid string fail in every consumer of StringToBigInt:
BigInt("\u16801\u1680") // currently SyntaxError; must be 1n
1n == "\u16801\u1680" // currently false; must be true
1n < "\u16802\u1680" // currently false; must be trueThe repository already owns a UTF-8-aware ECMAScript trim implementation (jsTrim/isJsTrimCp), so the BigInt grammar must use that single complete definition rather than another partial byte set.
Scope
- Route BigInt construction and arbitrary-precision comparison through the complete ECMAScript WhiteSpace + LineTerminator trim set.
- Cover all required code points on both boundaries, empty-after-trim input, decimal and radix forms, oversized BigInts, loose equality, and relational comparison.
- Preserve invalid embedded whitespace and malformed grammar as failures.
- Keep processing linear, allocation-bounded, and independent of host libraries.
No-workaround rules
- No input-specific character list at call sites, ASCII-only shortcut, normalization, host Unicode/JavaScript engine, or relaxing whitespace inside the integer grammar.
- Do not duplicate the trim table; use the owned canonical ECMAScript predicate/path.
Acceptance
- Focused runtime probes pass for every ECMA-262 WhiteSpace and LineTerminator code point.
- Constructor, loose equality, relational comparison, empty input, radix, and oversized BigInt cases share the same behavior.
- Invalid embedded whitespace remains rejected/unequal.
- Focused unit and test262 BigInt/equality subtrees have no regressions.