normalize-path

Normalize file path slashes to be unix-like forward slashes, regardless of OS (since in reality Windows doesn't care about slash direction anyway). Also condenses repeat slashes to a single slash and removes and trailing slashes.

Install

Install with npm:

npm i normalize-path --save-dev

Usage

var normalize = require('normalize-path');
console.log(normalize('\\foo\\bar\\baz\\'));
//=> '//foo/bar/baz'

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

This file was generated by verb-cli on June 25, 2014.

Last updated