R8244/node_modules/normalize-path14df7e7ba70fsolothurn
normalize-path
README.md
normalize-path    
Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.
Install
Install with npm:
sh $ npm install --save normalize-path
Usage
js var normalize = require('normalize-path'); normalize('\\foo\\bar\\baz\\'); //=> '/foo/bar/baz' normalize('./foo/bar/baz/'); //=> './foo/bar/baz'
Pass false as the last argument to keep trailing slashes:
js normalize('./foo/bar/baz/', false); //=> './foo/bar/baz/' normalize('foo\\bar\\baz\\', false); //=> 'foo/bar/baz/'
About
Related projects
- contains-path: Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
- ends-with: Returns true if the given string or array ends with suffix using strict equality for… more | [homepage](https://github.com/jonschlinkert/ends-with "Returns true if the given string or array ends with suffix using strict equality for comparisons.")
- is-absolute: Polyfill for node.js path.isAbolute. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js path.isAbolute. Returns true if a file path is absolute.")
- is-relative: Returns true if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns true if the path appears to be relative.")
- parse-filepath: Pollyfill for node.js path.parse, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js path.parse, parses a filepath into an object.")
- path-ends-with: Return true if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return true if a file path ends with the given string/suffix.")
- path-segments: Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.")
- rewrite-ext: Automatically re-write the destination extension of a filepath based on the source extension. e.g… more | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g .coffee => .js. This will only rename the ext, no other path parts are modified.")
- unixify: Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Contributors
Commits | Contributor | |
---|---|---|
31 | jonschlinkert | |
1 | phated | |
Building docs
_(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](.verb.md) readme template.)_
To generate the readme, run the following command:
sh $ npm install -g verbose/verb#dev verb-generate-readme && verb
Running tests
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
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the [MIT License](LICENSE).
_This file was generated by verb-generate-readme, v0.4.3, on March 29, 2017._