| 123456789101112131415161718192021222324252627282930 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.isValidFunctionLiteralChar = exports.isNumber = exports.isLetter = exports.isWhitespace = void 0;
- function isWhitespace(code) {
- // TODO: other whitespaces
- return 32 /* SPACE */ === code ||
- 9 /* TAB */ === code ||
- 10 /* LINE_FEED */ === code ||
- 13 /* CARRIAGE_RETURN */ === code;
- }
- exports.isWhitespace = isWhitespace;
- function isLetter(code) {
- return (code >= 65 /* UPPER_A */ && code <= 90 /* UPPER_Z */) || // A-Z
- (code >= 97 /* LOWER_A */ && code <= 122 /* LOWER_Z */) || // a-z
- code === 45 /* MINUS */ || // -
- code === 95 /* UNDER_LINE */; // _
- }
- exports.isLetter = isLetter;
- function isNumber(code) {
- return code >= 48 /* _0 */ && code <= 57 /* _9 */; // 0-9
- }
- exports.isNumber = isNumber;
- function isValidFunctionLiteralChar(code) {
- return isNumber(code) ||
- (code >= 65 /* UPPER_A */ && code <= 90 /* UPPER_Z */) ||
- (code >= 97 /* LOWER_A */ && code <= 122 /* LOWER_Z */) ||
- code === 95 /* UNDER_LINE */ ||
- code === 36 /* $ */;
- }
- exports.isValidFunctionLiteralChar = isValidFunctionLiteralChar;
|