# mkdirp-promise

> Promise version of mkdirp

Latest version **5.0.1** (published 2017-01-31) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install mkdirp-promise
pnpm add mkdirp-promise
yarn add mkdirp-promise
bun add mkdirp-promise
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 5.0.1 |
| Published | 2017-01-31 |
| First published | 2015-06-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/mkdirp-promise) |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Ahmad Nassri |
| Maintainers | ahmadnassri |
| Keywords | mkdirp, promise |

## Links

- npm: https://www.npmjs.com/package/mkdirp-promise
- Repository: https://github.com/ahmadnassri/mkdirp-promise
- Issues: https://github.com/ahmadnassri/mkdirp-promise/issues
- npm.io page: https://npm.io/package/mkdirp-promise

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) *

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 5.0.1 (latest) — 2017-01-31
- 5.0.0 — 2016-12-13
- 4.0.1 — 2016-11-09
- 4.0.0 — 2016-11-01
- 3.0.1 — 2016-08-20
- 3.0.0 — 2016-08-19
- 2.0.0 — 2016-05-11
- 1.1.0 — 2016-05-11
- 1.0.4 — 2016-03-22
- 1.0.3 — 2015-08-18
- 1.0.2 — 2015-06-21
- 1.0.1 — 2015-06-21
- 1.0.0 — 2015-06-21

## README

# mkdirp-promise [![version][npm-version]][npm-url] [![License][license-image]][license-url]

[Promise] version of [mkdirp]:

> Like mkdir -p, but in node.js!

[![Build Status][travis-image]][travis-url]
[![Downloads][npm-downloads]][npm-url]
[![Code Climate][codeclimate-quality]][codeclimate-url]
[![Coverage Status][codeclimate-coverage]][codeclimate-url]
[![Dependency Status][dependencyci-image]][dependencyci-url]
[![Dependencies][david-image]][david-url]

## Install

```bash
npm install --only=production --save mkdirp-promise
```

## API

```js
const mkdirp = require('mkdirp-promise')
```

### `mkdirp(dir, [, options])`

*pattern*: `String`
*options*: `Object` or `String`
Return: `Object` ([Promise])

When it finishes, it will be [*fulfilled*](http://promisesaplus.com/#point-26) with the first directory made that had to be created, if any.

When it fails, it will be [*rejected*](http://promisesaplus.com/#point-30) with an error as its first argument.

```js
mkdirp('/tmp/foo/bar/baz')
  .then(console.log) //=> '/tmp/foo'
  .catch(console.error)
```

#### `options`

The `option` object will be directly passed to [mkdirp](https://github.com/substack/node-mkdirp#mkdirpdir-opts-cb).

---
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) &nbsp;&middot;&nbsp;
> License: [ISC][license-url] &nbsp;&middot;&nbsp;
> Github: [@ahmadnassri](https://github.com/ahmadnassri) &nbsp;&middot;&nbsp;
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)

[license-url]: http://choosealicense.com/licenses/isc/
[license-image]: https://img.shields.io/github/license/ahmadnassri/mkdirp-promise.svg?style=flat-square

[travis-url]: https://travis-ci.org/ahmadnassri/mkdirp-promise
[travis-image]: https://img.shields.io/travis/ahmadnassri/mkdirp-promise.svg?style=flat-square

[npm-url]: https://www.npmjs.com/package/mkdirp-promise
[npm-version]: https://img.shields.io/npm/v/mkdirp-promise.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/mkdirp-promise.svg?style=flat-square

[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/mkdirp-promise
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/mkdirp-promise.svg?style=flat-square
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/mkdirp-promise.svg?style=flat-square

[david-url]: https://david-dm.org/ahmadnassri/mkdirp-promise
[david-image]: https://img.shields.io/david/ahmadnassri/mkdirp-promise.svg?style=flat-square

[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/mkdirp-promise
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/mkdirp-promise/badge?style=flat-square

[mkdirp]: https://github.com/substack/node-mkdirp
[Promise]: http://promisesaplus.com/

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