1 | export var charCodes; (function (charCodes) {
|
2 | const backSpace = 8; charCodes[charCodes["backSpace"] = backSpace] = "backSpace";
|
3 | const lineFeed = 10; charCodes[charCodes["lineFeed"] = lineFeed] = "lineFeed";
|
4 | const carriageReturn = 13; charCodes[charCodes["carriageReturn"] = carriageReturn] = "carriageReturn";
|
5 | const shiftOut = 14; charCodes[charCodes["shiftOut"] = shiftOut] = "shiftOut";
|
6 | const space = 32; charCodes[charCodes["space"] = space] = "space";
|
7 | const exclamationMark = 33; charCodes[charCodes["exclamationMark"] = exclamationMark] = "exclamationMark";
|
8 | const quotationMark = 34; charCodes[charCodes["quotationMark"] = quotationMark] = "quotationMark";
|
9 | const numberSign = 35; charCodes[charCodes["numberSign"] = numberSign] = "numberSign";
|
10 | const dollarSign = 36; charCodes[charCodes["dollarSign"] = dollarSign] = "dollarSign";
|
11 | const percentSign = 37; charCodes[charCodes["percentSign"] = percentSign] = "percentSign";
|
12 | const ampersand = 38; charCodes[charCodes["ampersand"] = ampersand] = "ampersand";
|
13 | const apostrophe = 39; charCodes[charCodes["apostrophe"] = apostrophe] = "apostrophe";
|
14 | const leftParenthesis = 40; charCodes[charCodes["leftParenthesis"] = leftParenthesis] = "leftParenthesis";
|
15 | const rightParenthesis = 41; charCodes[charCodes["rightParenthesis"] = rightParenthesis] = "rightParenthesis";
|
16 | const asterisk = 42; charCodes[charCodes["asterisk"] = asterisk] = "asterisk";
|
17 | const plusSign = 43; charCodes[charCodes["plusSign"] = plusSign] = "plusSign";
|
18 | const comma = 44; charCodes[charCodes["comma"] = comma] = "comma";
|
19 | const dash = 45; charCodes[charCodes["dash"] = dash] = "dash";
|
20 | const dot = 46; charCodes[charCodes["dot"] = dot] = "dot";
|
21 | const slash = 47; charCodes[charCodes["slash"] = slash] = "slash";
|
22 | const digit0 = 48; charCodes[charCodes["digit0"] = digit0] = "digit0";
|
23 | const digit1 = 49; charCodes[charCodes["digit1"] = digit1] = "digit1";
|
24 | const digit2 = 50; charCodes[charCodes["digit2"] = digit2] = "digit2";
|
25 | const digit3 = 51; charCodes[charCodes["digit3"] = digit3] = "digit3";
|
26 | const digit4 = 52; charCodes[charCodes["digit4"] = digit4] = "digit4";
|
27 | const digit5 = 53; charCodes[charCodes["digit5"] = digit5] = "digit5";
|
28 | const digit6 = 54; charCodes[charCodes["digit6"] = digit6] = "digit6";
|
29 | const digit7 = 55; charCodes[charCodes["digit7"] = digit7] = "digit7";
|
30 | const digit8 = 56; charCodes[charCodes["digit8"] = digit8] = "digit8";
|
31 | const digit9 = 57; charCodes[charCodes["digit9"] = digit9] = "digit9";
|
32 | const colon = 58; charCodes[charCodes["colon"] = colon] = "colon";
|
33 | const semicolon = 59; charCodes[charCodes["semicolon"] = semicolon] = "semicolon";
|
34 | const lessThan = 60; charCodes[charCodes["lessThan"] = lessThan] = "lessThan";
|
35 | const equalsTo = 61; charCodes[charCodes["equalsTo"] = equalsTo] = "equalsTo";
|
36 | const greaterThan = 62; charCodes[charCodes["greaterThan"] = greaterThan] = "greaterThan";
|
37 | const questionMark = 63; charCodes[charCodes["questionMark"] = questionMark] = "questionMark";
|
38 | const atSign = 64; charCodes[charCodes["atSign"] = atSign] = "atSign";
|
39 | const uppercaseA = 65; charCodes[charCodes["uppercaseA"] = uppercaseA] = "uppercaseA";
|
40 | const uppercaseB = 66; charCodes[charCodes["uppercaseB"] = uppercaseB] = "uppercaseB";
|
41 | const uppercaseC = 67; charCodes[charCodes["uppercaseC"] = uppercaseC] = "uppercaseC";
|
42 | const uppercaseD = 68; charCodes[charCodes["uppercaseD"] = uppercaseD] = "uppercaseD";
|
43 | const uppercaseE = 69; charCodes[charCodes["uppercaseE"] = uppercaseE] = "uppercaseE";
|
44 | const uppercaseF = 70; charCodes[charCodes["uppercaseF"] = uppercaseF] = "uppercaseF";
|
45 | const uppercaseG = 71; charCodes[charCodes["uppercaseG"] = uppercaseG] = "uppercaseG";
|
46 | const uppercaseH = 72; charCodes[charCodes["uppercaseH"] = uppercaseH] = "uppercaseH";
|
47 | const uppercaseI = 73; charCodes[charCodes["uppercaseI"] = uppercaseI] = "uppercaseI";
|
48 | const uppercaseJ = 74; charCodes[charCodes["uppercaseJ"] = uppercaseJ] = "uppercaseJ";
|
49 | const uppercaseK = 75; charCodes[charCodes["uppercaseK"] = uppercaseK] = "uppercaseK";
|
50 | const uppercaseL = 76; charCodes[charCodes["uppercaseL"] = uppercaseL] = "uppercaseL";
|
51 | const uppercaseM = 77; charCodes[charCodes["uppercaseM"] = uppercaseM] = "uppercaseM";
|
52 | const uppercaseN = 78; charCodes[charCodes["uppercaseN"] = uppercaseN] = "uppercaseN";
|
53 | const uppercaseO = 79; charCodes[charCodes["uppercaseO"] = uppercaseO] = "uppercaseO";
|
54 | const uppercaseP = 80; charCodes[charCodes["uppercaseP"] = uppercaseP] = "uppercaseP";
|
55 | const uppercaseQ = 81; charCodes[charCodes["uppercaseQ"] = uppercaseQ] = "uppercaseQ";
|
56 | const uppercaseR = 82; charCodes[charCodes["uppercaseR"] = uppercaseR] = "uppercaseR";
|
57 | const uppercaseS = 83; charCodes[charCodes["uppercaseS"] = uppercaseS] = "uppercaseS";
|
58 | const uppercaseT = 84; charCodes[charCodes["uppercaseT"] = uppercaseT] = "uppercaseT";
|
59 | const uppercaseU = 85; charCodes[charCodes["uppercaseU"] = uppercaseU] = "uppercaseU";
|
60 | const uppercaseV = 86; charCodes[charCodes["uppercaseV"] = uppercaseV] = "uppercaseV";
|
61 | const uppercaseW = 87; charCodes[charCodes["uppercaseW"] = uppercaseW] = "uppercaseW";
|
62 | const uppercaseX = 88; charCodes[charCodes["uppercaseX"] = uppercaseX] = "uppercaseX";
|
63 | const uppercaseY = 89; charCodes[charCodes["uppercaseY"] = uppercaseY] = "uppercaseY";
|
64 | const uppercaseZ = 90; charCodes[charCodes["uppercaseZ"] = uppercaseZ] = "uppercaseZ";
|
65 | const leftSquareBracket = 91; charCodes[charCodes["leftSquareBracket"] = leftSquareBracket] = "leftSquareBracket";
|
66 | const backslash = 92; charCodes[charCodes["backslash"] = backslash] = "backslash";
|
67 | const rightSquareBracket = 93; charCodes[charCodes["rightSquareBracket"] = rightSquareBracket] = "rightSquareBracket";
|
68 | const caret = 94; charCodes[charCodes["caret"] = caret] = "caret";
|
69 | const underscore = 95; charCodes[charCodes["underscore"] = underscore] = "underscore";
|
70 | const graveAccent = 96; charCodes[charCodes["graveAccent"] = graveAccent] = "graveAccent";
|
71 | const lowercaseA = 97; charCodes[charCodes["lowercaseA"] = lowercaseA] = "lowercaseA";
|
72 | const lowercaseB = 98; charCodes[charCodes["lowercaseB"] = lowercaseB] = "lowercaseB";
|
73 | const lowercaseC = 99; charCodes[charCodes["lowercaseC"] = lowercaseC] = "lowercaseC";
|
74 | const lowercaseD = 100; charCodes[charCodes["lowercaseD"] = lowercaseD] = "lowercaseD";
|
75 | const lowercaseE = 101; charCodes[charCodes["lowercaseE"] = lowercaseE] = "lowercaseE";
|
76 | const lowercaseF = 102; charCodes[charCodes["lowercaseF"] = lowercaseF] = "lowercaseF";
|
77 | const lowercaseG = 103; charCodes[charCodes["lowercaseG"] = lowercaseG] = "lowercaseG";
|
78 | const lowercaseH = 104; charCodes[charCodes["lowercaseH"] = lowercaseH] = "lowercaseH";
|
79 | const lowercaseI = 105; charCodes[charCodes["lowercaseI"] = lowercaseI] = "lowercaseI";
|
80 | const lowercaseJ = 106; charCodes[charCodes["lowercaseJ"] = lowercaseJ] = "lowercaseJ";
|
81 | const lowercaseK = 107; charCodes[charCodes["lowercaseK"] = lowercaseK] = "lowercaseK";
|
82 | const lowercaseL = 108; charCodes[charCodes["lowercaseL"] = lowercaseL] = "lowercaseL";
|
83 | const lowercaseM = 109; charCodes[charCodes["lowercaseM"] = lowercaseM] = "lowercaseM";
|
84 | const lowercaseN = 110; charCodes[charCodes["lowercaseN"] = lowercaseN] = "lowercaseN";
|
85 | const lowercaseO = 111; charCodes[charCodes["lowercaseO"] = lowercaseO] = "lowercaseO";
|
86 | const lowercaseP = 112; charCodes[charCodes["lowercaseP"] = lowercaseP] = "lowercaseP";
|
87 | const lowercaseQ = 113; charCodes[charCodes["lowercaseQ"] = lowercaseQ] = "lowercaseQ";
|
88 | const lowercaseR = 114; charCodes[charCodes["lowercaseR"] = lowercaseR] = "lowercaseR";
|
89 | const lowercaseS = 115; charCodes[charCodes["lowercaseS"] = lowercaseS] = "lowercaseS";
|
90 | const lowercaseT = 116; charCodes[charCodes["lowercaseT"] = lowercaseT] = "lowercaseT";
|
91 | const lowercaseU = 117; charCodes[charCodes["lowercaseU"] = lowercaseU] = "lowercaseU";
|
92 | const lowercaseV = 118; charCodes[charCodes["lowercaseV"] = lowercaseV] = "lowercaseV";
|
93 | const lowercaseW = 119; charCodes[charCodes["lowercaseW"] = lowercaseW] = "lowercaseW";
|
94 | const lowercaseX = 120; charCodes[charCodes["lowercaseX"] = lowercaseX] = "lowercaseX";
|
95 | const lowercaseY = 121; charCodes[charCodes["lowercaseY"] = lowercaseY] = "lowercaseY";
|
96 | const lowercaseZ = 122; charCodes[charCodes["lowercaseZ"] = lowercaseZ] = "lowercaseZ";
|
97 | const leftCurlyBrace = 123; charCodes[charCodes["leftCurlyBrace"] = leftCurlyBrace] = "leftCurlyBrace";
|
98 | const verticalBar = 124; charCodes[charCodes["verticalBar"] = verticalBar] = "verticalBar";
|
99 | const rightCurlyBrace = 125; charCodes[charCodes["rightCurlyBrace"] = rightCurlyBrace] = "rightCurlyBrace";
|
100 | const tilde = 126; charCodes[charCodes["tilde"] = tilde] = "tilde";
|
101 | const nonBreakingSpace = 160; charCodes[charCodes["nonBreakingSpace"] = nonBreakingSpace] = "nonBreakingSpace";
|
102 |
|
103 | const oghamSpaceMark = 5760; charCodes[charCodes["oghamSpaceMark"] = oghamSpaceMark] = "oghamSpaceMark";
|
104 | const lineSeparator = 8232; charCodes[charCodes["lineSeparator"] = lineSeparator] = "lineSeparator";
|
105 | const paragraphSeparator = 8233; charCodes[charCodes["paragraphSeparator"] = paragraphSeparator] = "paragraphSeparator";
|
106 | })(charCodes || (charCodes = {}));
|
107 |
|
108 | export function isDigit(code) {
|
109 | return (
|
110 | (code >= charCodes.digit0 && code <= charCodes.digit9) ||
|
111 | (code >= charCodes.lowercaseA && code <= charCodes.lowercaseF) ||
|
112 | (code >= charCodes.uppercaseA && code <= charCodes.uppercaseF)
|
113 | );
|
114 | }
|