source: frontend/node_modules/whatwg-url/dist/infra.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 518 bytes
Line 
1"use strict";
2
3// Note that we take code points as JS numbers, not JS strings.
4
5function isASCIIDigit(c) {
6 return c >= 0x30 && c <= 0x39;
7}
8
9function isASCIIAlpha(c) {
10 return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);
11}
12
13function isASCIIAlphanumeric(c) {
14 return isASCIIAlpha(c) || isASCIIDigit(c);
15}
16
17function isASCIIHex(c) {
18 return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);
19}
20
21module.exports = {
22 isASCIIDigit,
23 isASCIIAlpha,
24 isASCIIAlphanumeric,
25 isASCIIHex
26};
Note: See TracBrowser for help on using the repository browser.