984ed64573295f2e2937bbc946a5f6eda53cf97f7db1614ef5487ffde11615ef5c28671cadd769aa37f38eb4161ef8060d32c6ec50c06d2a4af090be2c0f96 294 B

1234567891011
  1. 'use strict';
  2. module.exports = input => {
  3. const isExtendedLengthPath = /^\\\\\?\\/.test(input);
  4. const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex
  5. if (isExtendedLengthPath || hasNonAscii) {
  6. return input;
  7. }
  8. return input.replace(/\\/g, '/');
  9. };