.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / normalize-path / README.md
1 # normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path)  [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
2
3 > 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.
4
5 ## Install
6
7 Install with [npm](https://www.npmjs.com/):
8
9 ```sh
10 $ npm install --save normalize-path
11 ```
12
13 ## Usage
14
15 ```js
16 var normalize = require('normalize-path');
17
18 normalize('\\foo\\bar\\baz\\');
19 //=> '/foo/bar/baz'
20
21 normalize('./foo/bar/baz/');
22 //=> './foo/bar/baz'
23 ```
24
25 Pass `false` as the last argument to **keep** trailing slashes:
26
27 ```js
28 normalize('./foo/bar/baz/', false);
29 //=> './foo/bar/baz/'
30
31 normalize('foo\\bar\\baz\\', false);
32 //=> 'foo/bar/baz/'
33 ```
34
35 ## About
36
37 ### Related projects
38
39 * [contains-path](https://www.npmjs.com/package/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.")
40 * [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.")
41 * [is-absolute](https://www.npmjs.com/package/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.")
42 * [is-relative](https://www.npmjs.com/package/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.")
43 * [parse-filepath](https://www.npmjs.com/package/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.")
44 * [path-ends-with](https://www.npmjs.com/package/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.")
45 * [path-segments](https://www.npmjs.com/package/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.")
46 * [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [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.")
47 * [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
48
49 ### Contributing
50
51 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
52
53 ### Contributors
54
55 | **Commits** | **Contributor** | 
56 | --- | --- |
57 | 31 | [jonschlinkert](https://github.com/jonschlinkert) |
58 | 1 | [phated](https://github.com/phated) |
59
60 ### Building docs
61
62 _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
63
64 To generate the readme, run the following command:
65
66 ```sh
67 $ npm install -g verbose/verb#dev verb-generate-readme && verb
68 ```
69
70 ### Running tests
71
72 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:
73
74 ```sh
75 $ npm install && npm test
76 ```
77
78 ### Author
79
80 **Jon Schlinkert**
81
82 * [github/jonschlinkert](https://github.com/jonschlinkert)
83 * [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
84
85 ### License
86
87 Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
88 Released under the [MIT License](LICENSE).
89
90 ***
91
92 _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._