# path-format

> Node.js path.format() polyfill

Latest version **1.2.1** (published 2015-09-21) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2015-09-21 |
| First published | 2015-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | 00dani |
| Keywords | path, paths, file, dir, format, built-in, util, utils, core, polyfill, shim |

## Links

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

## Dependencies (2)

- [is-object](https://npm.io/package/is-object.md) ^1.0.1
- [is-string](https://npm.io/package/is-string.md) ^1.0.4

## 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.2.1 (latest) — 2015-09-21
- 1.2.0 — 2015-08-13
- 1.1.0 — 2015-08-13
- 1.0.1 — 2015-08-13
- 1.0.0 — 2015-08-13

## README

# path-format

> Node.js [`path.format(pathObject)`](https://nodejs.org/api/path.html#path_path_format_pathobject) polyfill.

## Install

```
$ npm install --save path-format
```

## Usage

```js
var pathFormat = require('path-format');

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

## API

### pathFormat(path)

See [`path.format(pathObject)`](https://nodejs.org/api/path.html#path_path_format_pathobject) docs.

### pathFormat.posix(path)

The Posix specific version.

### pathFormat.win32(path)

The Windows specific version.

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