Skip to content

Commit

Permalink
path: replace "magic" numbers by readable constants
Browse files Browse the repository at this point in the history
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
daynin authored and MylesBorins committed Feb 21, 2018
1 parent 92ed071 commit 5331454
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 111 deletions.
16 changes: 16 additions & 0 deletions lib/internal/constants.js
Original file line number Diff line number Diff line change
@@ -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, /*?*/
};
Loading

0 comments on commit 5331454

Please sign in to comment.