summaryrefslogtreecommitdiff
path: root/lib/path.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/path.js b/lib/path.js
index 02cdf541b6..f1acb06b45 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -1,7 +1,7 @@
'use strict';
-var isWindows = process.platform === 'win32';
-var util = require('util');
+const isWindows = process.platform === 'win32';
+const util = require('util');
// resolves . and .. elements in a path array with directory names there
@@ -33,11 +33,11 @@ function normalizeArray(parts, allowAboveRoot) {
// Regex to split a windows path into three parts: [*, device, slash,
// tail] windows-only
-var splitDeviceRe =
+const splitDeviceRe =
/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
// Regex to split the tail part of the above into [*, dir, basename, ext]
-var splitTailRe =
+const splitTailRe =
/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
var win32 = {};
@@ -378,7 +378,7 @@ win32.delimiter = ';';
// Split a filename into [root, dir, basename, ext], unix version
// 'root' is just a slash, or nothing.
-var splitPathRe =
+const splitPathRe =
/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
var posix = {};