npm.io
1.0.7 • Published 5 years ago

path-parse

Licence
MIT
Version
1.0.7
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
56

path-parse Build Status

Node.js path.parse(pathString) ponyfill.

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