# dirdir

> Make a directory

Latest version **0.1.0** (published 2020-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install dirdir
pnpm add dirdir
yarn add dirdir
bun add dirdir
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-09-26 |
| First published | 2020-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.13.0 |
| Dependencies | 1 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 82 |
| Maintainers | fosimus, psxcode, deepsweet |

## Links

- npm: https://www.npmjs.com/package/dirdir
- Repository: https://github.com/nextools/metarepo
- Homepage: https://github.com/nextools/metarepo#readme
- Issues: https://github.com/nextools/metarepo/issues
- npm.io page: https://npm.io/package/dirdir

## Dependencies (1)

- [pifs](https://npm.io/package/pifs.md) ^2.0.0

## Recent versions

- 0.1.0 (latest) — 2020-09-26
- 0.0.0 — 2020-09-23

## README

# dirdir ![npm](https://flat.badgen.net/npm/v/dirdir)

Make a directory.

* always recursive
* return full path instead of "first directory path created"
* return `null` instead of `undefined` when directory already exists

## Install

```sh
$ yarn add dirdir
```

## Usage

```ts
const makeDir: (dirPath: string) => Promise<string | null>
```

```ts
import { makeDir } from 'dirdir'

console.log(prcess.cwd())
// /foo

console.log(
  await makeDir('bar/baz')
)
// '/foo/bar/baz'

console.log(
  await makeDir('/foo')
)
// null
```

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