Skip to content

Commit a1349d6

Browse files
committed
Fix example with optional parameter in readme
1 parent 695adf6 commit a1349d6

File tree

2 files changed

+39
-31
lines changed

2 files changed

+39
-31
lines changed

.verb.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Usage
22

33
```js
4-
var unixify = require('{%= name %}');
4+
const unixify = require('{%= name %}');
55
unixify(filepath[, stripTrailingSlash]);
66
```
77

@@ -43,6 +43,6 @@ By passing `false` as the second argument
4343

4444

4545
```js
46-
unixify('one//two//////three//'), //=> 'one/two/three/'
47-
unixify('C:\\one\\two\\three\\'); //=> '/one/two/three/'
46+
unixify('one//two//////three//', false), //=> 'one/two/three/'
47+
unixify('C:\\one\\two\\three\\', false); //=> '/one/two/three/'
4848
```

README.md

+36-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# unixify [![NPM version](https://img.shields.io/npm/v/unixify.svg?style=flat)](https://www.npmjs.com/package/unixify) [![NPM monthly downloads](https://img.shields.io/npm/dm/unixify.svg?style=flat)](https://npmjs.org/package/unixify) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unixify.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unixify)
1+
# unixify [![NPM version](https://img.shields.io/npm/v/unixify.svg?style=flat)](https://www.npmjs.com/package/unixify) [![NPM monthly downloads](https://img.shields.io/npm/dm/unixify.svg?style=flat)](https://npmjs.org/package/unixify) [![NPM total downloads](https://img.shields.io/npm/dt/unixify.svg?style=flat)](https://npmjs.org/package/unixify) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unixify.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unixify)
22

33
> Convert Windows file paths to unix paths.
44
5+
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
6+
57
## Install
68

79
Install with [npm](https://www.npmjs.com/):
@@ -10,16 +12,10 @@ Install with [npm](https://www.npmjs.com/):
1012
$ npm install --save unixify
1113
```
1214

13-
Install with [yarn](https://yarnpkg.com):
14-
15-
```sh
16-
$ yarn add unixify
17-
```
18-
1915
## Usage
2016

2117
```js
22-
var unixify = require('unixify');
18+
const unixify = require('unixify');
2319
unixify(filepath[, stripTrailingSlash]);
2420
```
2521

@@ -60,25 +56,32 @@ unixify('C:\\one\\two\\three\\'); //=> '/one/two/three'
6056
By passing `false` as the second argument
6157

6258
```js
63-
unixify('one//two//////three//'), //=> 'one/two/three/'
64-
unixify('C:\\one\\two\\three\\'); //=> '/one/two/three/'
59+
unixify('one//two//////three//', false), //=> 'one/two/three/'
60+
unixify('C:\\one\\two\\three\\', false); //=> '/one/two/three/'
6561
```
6662

6763
## About
6864

69-
### Related projects
65+
<details>
66+
<summary><strong>Contributing</strong></summary>
7067

71-
* [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.")
72-
* [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.")
73-
* [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.")
74-
* [normalize-path](https://www.npmjs.com/package/normalize-path): Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a… [more](https://github.com/jonschlinkert/normalize-path) | [homepage](https://github.com/jonschlinkert/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.")
75-
* [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.")
68+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
7669

77-
### Contributing
70+
</details>
7871

79-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
72+
<details>
73+
<summary><strong>Running Tests</strong></summary>
8074

81-
### Building docs
75+
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:
76+
77+
```sh
78+
$ npm install && npm test
79+
```
80+
81+
</details>
82+
83+
<details>
84+
<summary><strong>Building docs</strong></summary>
8285

8386
_(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.)_
8487

@@ -88,26 +91,31 @@ To generate the readme, run the following command:
8891
$ npm install -g verbose/verb#dev verb-generate-readme && verb
8992
```
9093

91-
### Running tests
94+
</details>
9295

93-
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:
96+
### Related projects
9497

95-
```sh
96-
$ npm install && npm test
97-
```
98+
Other useful libraries for working with paths in node.js:
99+
100+
* [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.")
101+
* [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.")
102+
* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.")
103+
* [normalize-path](https://www.npmjs.com/package/normalize-path): Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes… [more](https://github.com/jonschlinkert/normalize-path) | [homepage](https://github.com/jonschlinkert/normalize-path "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.")
104+
* [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.")
98105

99106
### Author
100107

101108
**Jon Schlinkert**
102109

103-
* [github/jonschlinkert](https://github.com/jonschlinkert)
104-
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
110+
* [GitHub Profile](https://github.com/jonschlinkert)
111+
* [Twitter Profile](https://twitter.com/jonschlinkert)
112+
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
105113

106114
### License
107115

108-
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
116+
Copyright © 2021, [Jon Schlinkert](https://github.com/jonschlinkert).
109117
Released under the [MIT License](LICENSE).
110118

111119
***
112120

113-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._
121+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 06, 2021._

0 commit comments

Comments
 (0)