Portfolio/node_modules/path-parse
Repository files (latest commit first)
Filename Latest commit message Latest commit date
oitsjustjose 4e066bffc9 Init
2017-02-25 03:50:31 -05:00
..
.travis.yml Init 2017-02-25 03:50:31 -05:00
index.js Init 2017-02-25 03:50:31 -05:00
index.min.js Init 2017-02-25 03:50:31 -05:00
package.json Init 2017-02-25 03:50:31 -05:00
README.md Init 2017-02-25 03:50:31 -05:00
test.js Init 2017-02-25 03:50:31 -05:00
test.min.js Init 2017-02-25 03:50:31 -05:00

path-parse Build Status

Node.js path.parse(pathString) ponyfill.

Ponyfill: A polyfill that doesn't overwrite the native method

Install

$ npm install --save path-parse

Usage

var pathParse = require('path-parse');

pathParse('/home/user/dir/file.txt');
//=> {
//       root : "/",
//       dir : "/home/user/dir",
//       base : "file.txt",
//       ext : ".txt",
//       name : "file"
//   }

API

See path.parse(pathString) docs.

pathParse(path)

pathParse.posix(path)

The Posix specific version.

pathParse.win32(path)

The Windows specific version.

License

MIT © Javier Blanco