diff --git a/.verb.md b/.verb.md index 09e88ce..690c5be 100644 --- a/.verb.md +++ b/.verb.md @@ -1,7 +1,7 @@ ## Usage ```js -var unixify = require('{%= name %}'); +const unixify = require('{%= name %}'); unixify(filepath[, stripTrailingSlash]); ``` @@ -43,6 +43,6 @@ By passing `false` as the second argument ```js -unixify('one//two//////three//'), //=> 'one/two/three/' -unixify('C:\\one\\two\\three\\'); //=> '/one/two/three/' +unixify('one//two//////three//', false), //=> 'one/two/three/' +unixify('C:\\one\\two\\three\\', false); //=> '/one/two/three/' ``` diff --git a/README.md b/README.md index 5af2ce9..efc38ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# 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) +# 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) > Convert Windows file paths to unix paths. +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + ## Install Install with [npm](https://www.npmjs.com/): @@ -10,16 +12,10 @@ Install with [npm](https://www.npmjs.com/): $ npm install --save unixify ``` -Install with [yarn](https://yarnpkg.com): - -```sh -$ yarn add unixify -``` - ## Usage ```js -var unixify = require('unixify'); +const unixify = require('unixify'); unixify(filepath[, stripTrailingSlash]); ``` @@ -60,25 +56,32 @@ unixify('C:\\one\\two\\three\\'); //=> '/one/two/three' By passing `false` as the second argument ```js -unixify('one//two//////three//'), //=> 'one/two/three/' -unixify('C:\\one\\two\\three\\'); //=> '/one/two/three/' +unixify('one//two//////three//', false), //=> 'one/two/three/' +unixify('C:\\one\\two\\three\\', false); //=> '/one/two/three/' ``` ## About -### Related projects +
+Contributing -* [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.") -* [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.") -* [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.") -* [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.") -* [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.") +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). -### Contributing +
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). +
+Running Tests -### Building docs +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 +``` + +
+ +
+Building docs _(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.)_ @@ -88,26 +91,31 @@ To generate the readme, run the following command: $ 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: +### Related projects -```sh -$ npm install && npm test -``` +Other useful libraries for working with paths in node.js: + +* [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.") +* [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.") +* [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`.") +* [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.") +* [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.") ### Author **Jon Schlinkert** -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) ### License -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Copyright © 2021, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._ \ No newline at end of file +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on January 06, 2021._ \ No newline at end of file