Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
path: replace "magic" numbers by readable constants
PR-URL: #18654 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
- Loading branch information
Showing
with
144 additions
and 111 deletions.
- +16 −0 lib/internal/constants.js
- +127 −111 lib/path.js
- +1 −0 node.gyp
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
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_COLON: 58, /*:*/ | ||
CHAR_QUESTION_MARK: 63, /*?*/ | ||
}; |
Oops, something went wrong.