🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

makedirp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makedirp

The 'mkdir -p' command implementation for nodejs.Make directory recursively.

latest
Source
npmnpm
Version
1.3.3
Version published
Maintainers
1
Created
Source

makedirp

The 'mkdir -p' command implementation for nodejs.Make directory recursively.

Installation

npm install makedirp

Usage

import { mkdirpSync, mkdirp } from 'makedirp'
// or
import { createRequire } from 'node:module'
const require = createRequire(import.meta.url)
const { mkdirpSync, mkdirp } = require('makedirp')

mkdirpSync(path, mode?)

mkdirpSync([path1, path2], mode?)

mkdirpSync([{ path: path1, mode: 0o777 }, {path: path2}])

const paths = Promise.all([
  mkdirp('dir1/test'),
  mkdirp('dir2/config')
])

console.log(paths)

/*
[
	'/workspace/proj/dir1/test',
	'/workspace/proj/dir2/config'
]
*/

Command Line Interface

Usage: makedirp [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.

Options:
  --                     Treat all subsequent arguments as DIRECTORY(ies)
  -h, --help             display this help and exit
  -v, --version          output version information and exit
  -m=MODE, --mode=MODE   set file mode (as in chmod), not a=rwx - umask

Keywords

mkdir

FAQs

Package last updated on 10 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts