🔧
This commit is contained in:
6
node_modules/fdir/dist/utils.js
generated
vendored
6
node_modules/fdir/dist/utils.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.normalizePath = exports.convertSlashes = exports.cleanPath = void 0;
|
||||
exports.normalizePath = exports.isRootDirectory = exports.convertSlashes = exports.cleanPath = void 0;
|
||||
const path_1 = require("path");
|
||||
function cleanPath(path) {
|
||||
let normalized = (0, path_1.normalize)(path);
|
||||
@@ -16,6 +16,10 @@ function convertSlashes(path, separator) {
|
||||
return path.replace(SLASHES_REGEX, separator);
|
||||
}
|
||||
exports.convertSlashes = convertSlashes;
|
||||
function isRootDirectory(path) {
|
||||
return path === "/" || /^[a-z]:\\$/i.test(path);
|
||||
}
|
||||
exports.isRootDirectory = isRootDirectory;
|
||||
function normalizePath(path, options) {
|
||||
const { resolvePaths, normalizePath, pathSeparator } = options;
|
||||
const pathNeedsCleaning = (process.platform === "win32" && path.includes("/")) ||
|
||||
|
||||
Reference in New Issue
Block a user