pub fn is_js_whitespace(c: char) -> boolExpand description
ECMA-262 WhiteSpace (11.2) + LineTerminator (11.3): the exact character
set String.prototype.trim, ToNumber(string), parseInt and parseFloat
skip.
Written out rather than delegated to char::is_whitespace, which follows the
Unicode White_Space property. The two sets are NOT the same and they differ
in BOTH directions:
U+FEFF(ZWNBSP/BOM) is JS whitespace and is not UnicodeWhite_Space, so"\u{FEFF} x".trim()kept the BOM andNumber("\u{FEFF}1")wasNaN.U+0085(NEL) is UnicodeWhite_Spaceand is NOT JS whitespace, so"\u{85}x".trim()stripped a character node keeps.
U+180E is in neither set (Unicode 6.3 dropped it from White_Space,
ES2016 dropped it from WhiteSpace), which both engines already agreed on.