UNPKG

198 BJavaScriptView Raw
1var UNIX_SEPARATOR = '/';
2var WINDOWS_SEPARATOR_PATTERN = /\\/g;
3
4function normalizePath(path) {
5 return path.replace(WINDOWS_SEPARATOR_PATTERN, UNIX_SEPARATOR);
6}
7
8module.exports = normalizePath;