Urara-Blog/node_modules/.pnpm-store/v3/files/10/959e509915aa7154c503830e6f261f3707d2b4fbe01c5e63327fcfcbe7152cc2fe72fea0ad6e48c7e6ad111ba4345c373aea7d1ccfcddb8490ed0777c38080
2022-08-14 01:14:53 +08:00

11 lines
289 B
Text

'use strict';
module.exports = path => {
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
if (isExtendedLengthPath || hasNonAscii) {
return path;
}
return path.replace(/\\/g, '/');
};