normalize-path 2.1.1

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.

Homepage: https://github.com/jonschlinkert/normalize-path

Platform: npm

Language: JavaScript

License: MIT

Keywords: backslash, file, filepath, fix, forward, fp, fs, normalize, path, slash, slashes, trailing, unix, urix

Repository: git+https://github.com/jonschlinkert/normalize-path.git

View on registry: https://www.npmjs.com/package/normalize-path

Direct download link: https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz

Install: npm install [email protected]


normalize-path NPM version NPM monthly downloads NPM total downloads Linux Build Status

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:

$ npm install --save normalize-path

Usage

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:

normalize('./foo/bar/baz/', false);
//=> './foo/bar/baz/'

normalize('foo\\bar\\baz\\', false);
//=> 'foo/bar/baz/'

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

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 readme template.)

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:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.4.3, on March 29, 2017.

Sustain

Releases

2.1.1 March 29, 2017
2.1.0 March 29, 2017
2.0.1 November 17, 2015
2.0.0 October 04, 2015
1.0.0 January 24, 2015
0.3.0 October 24, 2014
0.2.1 October 19, 2014
0.2.0 October 19, 2014
0.1.1 July 06, 2014
0.1.0 June 26, 2014

Project Statistics

SourceRank 19
Dependencies 1
Dependent projects 99
Dependent repositories 10.6K
Total releases 10
Latest release
First release
Stars 19
Forks 1
Watchers 3
Contributors 2
Repo Size: 31.3 KB

Top Contributors See all

Jon Schlinkert Blaine Bublitz

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-04-21 14:08:16 UTC

Login to resync this project