(byte: number)
| 296 | |
| 297 | /** @internal */ |
| 298 | const fromHexChar = (byte: number) => { |
| 299 | // '0' <= byte && byte <= '9' |
| 300 | if (48 <= byte && byte <= 57) { |
| 301 | return byte - 48 |
| 302 | } |
| 303 | |
| 304 | // 'a' <= byte && byte <= 'f' |
| 305 | if (97 <= byte && byte <= 102) { |
| 306 | return byte - 97 + 10 |
| 307 | } |
| 308 | |
| 309 | // 'A' <= byte && byte <= 'F' |
| 310 | if (65 <= byte && byte <= 70) { |
| 311 | return byte - 65 + 10 |
| 312 | } |
| 313 | |
| 314 | throw new TypeError("Invalid input") |
| 315 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…