// package
slash
type: "module"
// preferences
// replacements (1)
snippet::unix-paths
Simple or drop-in replacementThis package is no longer necessary. You can check the start of a path for the Windows extended-length path prefix and if it's not present, replace backslashes with forward slashes.
// example
path.startsWith('\\\\?\\')
? path
: path.replace(/\\/g, '/');