(input, pos, f, s, t)
| 450 | * @returns {boolean} true, if the three code points start a number |
| 451 | */ |
| 452 | const _ifThreeCodePointsWouldStartANumber = (input, pos, f, s, t) => { |
| 453 | const first = f || input.charCodeAt(pos - 1); |
| 454 | const second = s || input.charCodeAt(pos); |
| 455 | const third = t || input.charCodeAt(pos + 1); |
| 456 | if (first === CC_PLUS_SIGN || first === CC_HYPHEN_MINUS) { |
| 457 | if (_isDigit(second)) return true; |
| 458 | return second === CC_FULL_STOP && _isDigit(third); |
| 459 | } |
| 460 | if (first === CC_FULL_STOP) return _isDigit(second); |
| 461 | /* istanbul ignore next -- @preserve: spec-general; every caller passes `pos` just past a +/-/. so `first` is never a bare digit here */ |
| 462 | return _isDigit(first); |
| 463 | }; |
| 464 | |
| 465 | /** |
| 466 | * Consume an ident sequence (no validation of the first code points). |
no test coverage detected