• Home
Name
Date
Size
#Lines
LOC

..--

LICENSED12-May-20241.1 KiB2217

README.mdD12-May-2024871 4327

index.jsD12-May-20241.8 KiB7656

package.jsonD12-May-20241.5 KiB6362

README.md

1# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse)
2
3> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).
4
5## Install
6
7```
8$ npm install --save path-parse
9```
10
11## Usage
12
13```js
14var pathParse = require('path-parse');
15
16pathParse('/home/user/dir/file.txt');
17//=> {
18//       root : "/",
19//       dir : "/home/user/dir",
20//       base : "file.txt",
21//       ext : ".txt",
22//       name : "file"
23//   }
24```
25
26## API
27
28See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.
29
30### pathParse(path)
31
32### pathParse.posix(path)
33
34The Posix specific version.
35
36### pathParse.win32(path)
37
38The Windows specific version.
39
40## License
41
42MIT © [Javier Blanco](http://jbgutierrez.info)
43