name
changes / to \ if the platform is windows
Install
$ npm install if-win-backslash
Usage
const ifwinb = ; let path = // if on windows path = your\\path\\to\\something// on everything else = your/path/to/something
Text
API
ifwinb(path)
Returns a String
path, if on windows with backslashes,
on everything else with frontslashes.Also normalizes the path using upath
path
Type: string
Path can contain as many front and backslashes as you want
Related
- is-windows - Returns true if the platform is Windows.
License
MIT © Julian Beck