UNPKG

normalize-path

Version:

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.

25 lines (17 loc) 336 B
# {%= name %} {%= badge("fury") %} > {%= description %} ## Install {%= include("install") %} ## Usage ```js var normalize = require('{%= name %}'); console.log(normalize('\\foo\\bar\\baz\\')); //=> '//foo/bar/baz' ``` ## Author {%= include("author") %} ## License {%= copyright() %} {%= license() %} *** {%= include("footer") %}