Convert Windows file paths to unix paths.
npm install unixify> Convert Windows file paths to unix paths.
Install with npm:
``sh`
$ npm install --save unixify
Install with yarn:
`sh`
$ yarn add unixify
`js`
var unixify = require('unixify');
unixify(filepath[, stripTrailingSlash]);
Strips leading drive letters and dot-slash (./)
`js`
unixify('.\\one\\two\\three'); //=> 'one/two/three'
unixify('./one/two/three'); //=> 'one/two/three'
unixify('C:\\one\\two\\three'); //=> '/one/two/three'
unixify('\\one\\two\\three'); //=> '/one/two/three'
Normalizes path separators to forward slashes
`js`
unixify('one\\two\\three'); //=> 'one/two/three'
unixify('\\one\\two\\three'); //=> '/one/two/three'
unixify('C:\\one\\two\\three'); //=> '/one/two/three'
Combines multiple consecutive slashes
`js`
unixify('one//two//////three'), //=> 'one/two/three'
unixify('\\one\\two\\//three'); //=> '/one/two/three'
unixify('C:\\//one\\two\\//three'); //=> '/one/two/three'
Strips trailing slashes by default
`js`
unixify('one//two//////three//'), //=> 'one/two/three'
unixify('C:\\one\\two\\three\\'); //=> '/one/two/three'
Keep trailing slashes
By passing false as the second argument
`js`
unixify('one//two//////three//'), //=> 'one/two/three/'
unixify('C:\\one\\two\\three\\'); //=> '/one/two/three/'
* contains-path: Return true if a file path contains the given path. | homepage
* ends-with: Returns true if the given string or array ends with suffix using strict equality for… more | truepath.isAbolute if the given string or array ends with suffix using strict equality for comparisons."" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">homepage
* is-absolute: Polyfill for node.js . Returns true if a file path is absolute. | path.isAbolutetrue. Returns true if a file path is absolute."" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">homepage
* normalize-path: Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a… more | homepage
* path-ends-with: Return if a file path ends with the given string/suffix. | true if a file path ends with the given string/suffix."" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
_(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)_
To generate the readme, run the following command:
`sh`
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
`sh``
$ npm install && npm test
Jon Schlinkert
* github/jonschlinkert
* twitter/jonschlinkert
Copyright © 2017, Jon Schlinkert.
Released under the MIT License.
*
_This file was generated by verb-generate-readme, v0.5.0, on April 14, 2017._