Skip to content

Commit 71e84b4

Browse files
dayninMylesBorins
authored andcommitted
path: replace "magic" numbers by readable constants
PR-URL: #18654 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Kyle Farnung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 6b0ce80 commit 71e84b4

File tree

3 files changed

+144
-111
lines changed

3 files changed

+144
-111
lines changed

lib/internal/constants.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
3+
module.exports = {
4+
// Alphabet chars.
5+
CHAR_UPPERCASE_A: 65, /*A*/
6+
CHAR_LOWERCASE_A: 97, /*a*/
7+
CHAR_UPPERCASE_Z: 90, /*Z*/
8+
CHAR_LOWERCASE_Z: 122, /*z*/
9+
10+
// Non-alphabetic chars.
11+
CHAR_DOT: 46, /*.*/
12+
CHAR_FORWARD_SLASH: 47, /*/*/
13+
CHAR_BACKWARD_SLASH: 92, /*\*/
14+
CHAR_COLON: 58, /*:*/
15+
CHAR_QUESTION_MARK: 63, /*?*/
16+
};

0 commit comments

Comments
 (0)