path-parse
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/path-parse package

1.0.7 • Public • Published

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

Package Sidebar

Install

npm i path-parse

Weekly Downloads

41,027,964

Version

1.0.7

License

MIT

Unpacked Size

4.51 kB

Total Files

4

Last publish

Collaborators

  • jbgutierrez