@@ -50,13 +50,12 @@ const {
50
50
const {
51
51
getLazy,
52
52
emitExperimentalWarning,
53
+ isWindows,
54
+ isMacOS,
53
55
} = require ( 'internal/util' ) ;
54
56
55
57
const lazyMinimatch = getLazy ( ( ) => require ( 'internal/deps/minimatch/index' ) ) ;
56
58
57
- const platformIsWin32 = ( process . platform === 'win32' ) ;
58
- const platformIsOSX = ( process . platform === 'darwin' ) ;
59
-
60
59
function isPathSeparator ( code ) {
61
60
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH ;
62
61
}
@@ -167,7 +166,7 @@ function glob(path, pattern, windows) {
167
166
validateString ( pattern , 'pattern' ) ;
168
167
return lazyMinimatch ( ) . minimatch ( path , pattern , {
169
168
__proto__ : null ,
170
- nocase : platformIsOSX || platformIsWin32 ,
169
+ nocase : isMacOS || isWindows ,
171
170
windowsPathsNoEscape : true ,
172
171
nonegate : true ,
173
172
nocomment : true ,
@@ -1100,7 +1099,7 @@ const win32 = {
1100
1099
} ;
1101
1100
1102
1101
const posixCwd = ( ( ) => {
1103
- if ( platformIsWin32 ) {
1102
+ if ( isWindows ) {
1104
1103
// Converts Windows' backslash path separators to POSIX forward slashes
1105
1104
// and truncates any drive indicator
1106
1105
const regexp = / \\ / g;
@@ -1575,4 +1574,4 @@ posix.posix = win32.posix = posix;
1575
1574
win32 . _makeLong = win32 . toNamespacedPath ;
1576
1575
posix . _makeLong = posix . toNamespacedPath ;
1577
1576
1578
- module . exports = platformIsWin32 ? win32 : posix ;
1577
+ module . exports = isWindows ? win32 : posix ;
0 commit comments