@jswalden/streaming-json
Version:
Streaming JSON parsing and stringification for JavaScript/TypeScript
15 lines • 391 B
JavaScript
import { StringCharCodeAt } from "../stdlib/string.js";
;
export function IsAsciiDigit(c) {
return 48 <= c && c <= 57;
}
export function HexDigitToNumber(fragment, i) {
let c = StringCharCodeAt(fragment, i);
if (48 <= c && c <= 57)
return c - 48;
c &= ~32;
if (65 <= c && c <= 70)
return c - 65 + 10;
return null;
}
//# sourceMappingURL=unicode.js.map