0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/lib/internal/constants.js
Ruben Bridgewater d478e52fe0
os: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:41 +02:00

53 lines
1.4 KiB
JavaScript

'use strict';
const isWindows = process.platform === 'win32';
module.exports = {
// Alphabet chars.
CHAR_UPPERCASE_A: 65, /* A */
CHAR_LOWERCASE_A: 97, /* a */
CHAR_UPPERCASE_Z: 90, /* Z */
CHAR_LOWERCASE_Z: 122, /* z */
// Non-alphabetic chars.
CHAR_DOT: 46, /* . */
CHAR_FORWARD_SLASH: 47, /* / */
CHAR_BACKWARD_SLASH: 92, /* \ */
CHAR_VERTICAL_LINE: 124, /* | */
CHAR_COLON: 58, /* : */
CHAR_QUESTION_MARK: 63, /* ? */
CHAR_UNDERSCORE: 95, /* _ */
CHAR_LINE_FEED: 10, /* \n */
CHAR_CARRIAGE_RETURN: 13, /* \r */
CHAR_TAB: 9, /* \t */
CHAR_FORM_FEED: 12, /* \f */
CHAR_EXCLAMATION_MARK: 33, /* ! */
CHAR_HASH: 35, /* # */
CHAR_SPACE: 32, /* */
CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
CHAR_LEFT_CURLY_BRACKET: 123, /* { */
CHAR_RIGHT_CURLY_BRACKET: 125, /* } */
CHAR_HYPHEN_MINUS: 45, /* - */
CHAR_PLUS: 43, /* + */
CHAR_DOUBLE_QUOTE: 34, /* " */
CHAR_SINGLE_QUOTE: 39, /* ' */
CHAR_PERCENT: 37, /* % */
CHAR_SEMICOLON: 59, /* ; */
CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
CHAR_GRAVE_ACCENT: 96, /* ` */
CHAR_AT: 64, /* @ */
CHAR_AMPERSAND: 38, /* & */
CHAR_EQUAL: 61, /* = */
// Digits
CHAR_0: 48, /* 0 */
CHAR_9: 57, /* 9 */
EOL: isWindows ? '\r\n' : '\n'
};