import { sep } from 'path' ; import { Platforms } from '../constants' ; export function addSlashPrefix ( path ) { const slashPrefix = path . startsWith ( sep ) ? '' : sep ; return `${ slashPrefix }${ path }` ; } export function convertBackSlashToSlash ( path ) { if ( process . platform === Platforms . WINDOWS ) { return path . replace ( /\\/g , '/' ) ; } return path ; }