export const directorySeparator = '/' ; const backslashRegExp = /\\/g ; export function normalizeSlashes ( path ) { const index = path . indexOf ( '\\' ) ; if ( index === - 1 ) { return path ; } backslashRegExp . lastIndex = index ; return path . replace ( backslashRegExp , directorySeparator ) ; }