aswi2020vldc-gitlab/templetes/node_modules/slash/index.js @ f7dc4075
1 |
'use strict'; |
---|---|
2 |
module.exports = function (str) { |
3 |
var isExtendedLengthPath = /^\\\\\?\\/.test(str); |
4 |
var hasNonAscii = /[^\x00-\x80]+/.test(str); |
5 |
|
6 |
if (isExtendedLengthPath || hasNonAscii) { |
7 |
return str; |
8 |
}
|
9 |
|
10 |
return str.replace(/\\/g, '/'); |
11 |
};
|