# path-parse

> Node.js path.parse() ponyfill

Latest version **1.0.7** (published 2021-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install path-parse
pnpm add path-parse
yarn add path-parse
bun add path-parse
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-05-25 |
| First published | 2015-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/path-parse) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 57 |
| Author | Javier Blanco |
| Maintainers | jbgutierrez |
| Keywords | path, paths, file, dir, parse, built-in, util, utils, core, ponyfill, polyfill, shim |

## Links

- npm: https://www.npmjs.com/package/path-parse
- Repository: https://github.com/jbgutierrez/path-parse
- Homepage: https://github.com/jbgutierrez/path-parse#readme
- Issues: https://github.com/jbgutierrez/path-parse/issues
- npm.io page: https://npm.io/package/path-parse

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.7 (latest) — 2021-05-25
- 1.0.6 — 2018-08-06
- 1.0.5 — 2015-04-21
- 1.0.4 — 2015-04-21
- 1.0.3 — 2015-04-17
- 1.0.2 — 2015-04-17
- 1.0.1 — 2015-04-17
- 1.0.0 — 2015-04-17

## README

# path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse)

> Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com).

## Install

```
$ npm install --save path-parse
```

## Usage

```js
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)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs.

### pathParse(path)

### pathParse.posix(path)

The Posix specific version.

### pathParse.win32(path)

The Windows specific version.

## License

MIT © [Javier Blanco](http://jbgutierrez.info)

---
_Source: https://npm.io/package/path-parse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
