(matchEnd: number)
| 240 | let unitStart = -1; |
| 241 | |
| 242 | const push = (matchEnd: number) => { |
| 243 | const numEnd = unitStart > -1 ? unitStart : matchEnd; |
| 244 | const $num = input.slice(numStart, numEnd); |
| 245 | let n = parseFloat($num); |
| 246 | const r = range[numbers.length]; |
| 247 | if (unitStart > -1) { |
| 248 | const unit = input.slice(unitStart, matchEnd); |
| 249 | const u = units[unit]; |
| 250 | if (u != null) { |
| 251 | n *= r / u; |
| 252 | } |
| 253 | } |
| 254 | if (r > 1) { |
| 255 | n = Math.round(n); |
| 256 | } |
| 257 | numbers.push(n); |
| 258 | numStart = -1; |
| 259 | unitStart = -1; |
| 260 | }; |
| 261 | |
| 262 | for (let i = searchStart; i < searchEnd; i++) { |
| 263 | const c = input.charCodeAt(i); |
no outgoing calls
no test coverage detected