16 lines
311 B
JavaScript
16 lines
311 B
JavaScript
|
|
"use strict";
|
||
|
|
|
||
|
|
function slash(path) {
|
||
|
|
var isExtendedLengthPath = typeof path === "string" && path.indexOf("\\\\?\\") === 0;
|
||
|
|
|
||
|
|
if (isExtendedLengthPath) {
|
||
|
|
return path;
|
||
|
|
}
|
||
|
|
|
||
|
|
return String(path).replace(/\\\\/g, "/");
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = slash;
|
||
|
|
module.exports.default = slash;
|
||
|
|
module.exports.__esModule = true;
|