source: node_modules/slash/index.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 294 bytes
Line 
1'use strict';
2module.exports = input => {
3 const isExtendedLengthPath = /^\\\\\?\\/.test(input);
4 const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex
5
6 if (isExtendedLengthPath || hasNonAscii) {
7 return input;
8 }
9
10 return input.replace(/\\/g, '/');
11};
Note: See TracBrowser for help on using the repository browser.