projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b946a0841a01f4886706f0046d86fcf4f14a9184
[dotfiles/.git]
/
index.js
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
};