Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
1234567891011 |
- 'use strict';
- module.exports = function (str) {
- var isExtendedLengthPath = /^\\\\\?\\/.test(str);
- var hasNonAscii = /[^\x00-\x80]+/.test(str);
-
- if (isExtendedLengthPath || hasNonAscii) {
- return str;
- }
-
- return str.replace(/\\/g, '/');
- };
|