normalizePath = (input) => {
  if (input === path.posix.sep || input === path.win32.sep) {
    return path.posix.sep
  }

  let normalized = input.split(/[/\\]+/).join(path.posix.sep)

  /** Handle win32 Namespaced paths by changing e.g. \\.\ to //./ */
  if (input.startsWith(WIN32_FILE_NS) || input.startsWith(WIN32_DEVICE_NS)) {
    normalized = normalized.replace(/^\/(\.|\?)/, '//$1')
  }

  /** Remove trailing slash */
  if (normalized.endsWith(path.posix.sep)) {
    normalized = normalized.slice(0, -1)
  }

  return normalized
}
Normalize input file path to use POSIX separators
@param {String} input
@returns String