Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Feb 29, 2024 via pnpm

mkdirp 0.5.6

Recursively mkdir, like `mkdir -p`
Package summary
Share
0
issues
1
license
2
MIT
Package created
6 Jan 2011
Version published
22 Mar 2022
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
minimist@1.2.8
mkdirp@0.5.6
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of mkdirp 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
minimist1.2.815.16 kBMIT
prod

Visualizations

Frequently Asked Questions

What does mkdirp do?

The "mkdirp" package is used in Node.js to recursively create new directories, similar to how the mkdir -p function works in UNIX systems. This is a hybrid module, meaning you can import or require it. As a modern API, it aims to have zero bugs though acknowledges that a few may be missed.

How do you use mkdirp?

To use the "mkdirp" package, you first need to either import it using import { mkdirp } from 'mkdirp' or require it using const { mkdirp } = require('mkdirp'). The returned value is a Promise that resolves to the first directory created. For instance:

import { mkdirp } from 'mkdirp'

// return value is a Promise resolving to the first directory created
mkdirp('/tmp/foo/bar/baz').then(made =>
  console.log(`made directories, starting with ${made}`)
)

If you prefer not to use promises, the .sync function is available:

import { mkdirp } from 'mkdirp'

// return value is the first directory created
const made = mkdirp.sync('/tmp/foo/bar/baz')
console.log(`made directories, starting with ${made}`)

This ensures that the directories /tmp/foo/bar/baz now exist.

Where are the mkdirp docs?

The documentation for "mkdirp" can be found within the README of the package's GitHub page. This page includes in-depth explanations of all the methods provided by the package, example usage codes, CLI details, and tips for choosing a recursive mkdir implementation. The URL for the package's GitHub page is: https://github.com/isaacs/node-mkdirp.