Package Exports
- unixify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unixify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
unixify 
Convert Windows file paths to unix paths.
Install with npm
$ npm i unixify --saveUsage
var unixify = require('unixify');
unixify('one\\two\\three');
//=> 'one/two/three'
unixify('one\\two\\//three');
//=> 'one/two/three'
unixify('C:\\one\\two\\three');
//=> '/one/two/three'
unixify('C:\\//one\\//two\\//three');
//=> '/one/two/three'
unixify('C:\\//one\\two\\three');
//=> '/one/two/three'
unixify('C:\\//one\\two\\//three');
//=> '/one/two/three'Related
Other useful libraries for working with paths in node.js:
- contains-path: Return true if a file path contains the given path. | homepage
- ends-with: Returns
trueif the givenstringorarrayends withsuffixusing strict equality for… more | homepage - is-absolute: Return true if a file path is absolute. | homepage
- is-relative: Returns
trueif the path appears to be relative. | homepage - normalize-path: Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a… more | homepage
- parse-filepath: Parse a filepath into an object. Falls back on the native node.js
path.parsemethod if… more | homepage - path-ends-with: Return
trueif a file path ends with the given string/suffix. | homepage - path-segments: Get n specific segments of a file path, e.g. first 2, last 3, etc. | homepage
- rewrite-ext: Automatically re-write the destination extension of a filepath based on the source extension. e.g … more | homepage
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on October 04, 2015.