Gathering detailed insights and metrics for make-dir
Gathering detailed insights and metrics for make-dir
Gathering detailed insights and metrics for make-dir
Gathering detailed insights and metrics for make-dir
Make a directory and its parents if needed - Think `mkdir -p`
npm install make-dir
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
474 Stars
57 Commits
22 Forks
11 Watching
1 Branches
11 Contributors
Updated on 04 Aug 2024
JavaScript (93.47%)
TypeScript (6.53%)
Cumulative downloads
Total Downloads
Last day
-3.8%
16,383,796
Compared to previous day
Last week
3.9%
89,241,392
Compared to previous week
Last month
19.4%
353,710,387
Compared to previous month
Last year
17.4%
3,527,102,402
Compared to previous year
8
Make a directory and its parents if needed - Think
mkdir -p
[!TIP] You probably want the built-in
fsPromises.mkdir('…', {recursive: true})
instead.
fsPromises.mkdir('…', {recursive: true})
fs
implementation.mkdirp
mkdirp
issuesfs.mkdir/mkdirSync
recursive
option in Node.js unless overridden1npm install make-dir
1$ pwd 2/Users/sindresorhus/fun 3$ tree 4.
1import {makeDirectory} from 'make-dir'; 2 3const path = await makeDirectory('unicorn/rainbow/cake'); 4 5console.log(path); 6//=> '/Users/sindresorhus/fun/unicorn/rainbow/cake'
1$ tree
2.
3└── unicorn
4 └── rainbow
5 └── cake
Multiple directories:
1import {makeDirectory} from 'make-dir'; 2 3const paths = await Promise.all([ 4 makeDirectory('unicorn/rainbow'), 5 makeDirectory('foo/bar') 6]); 7 8console.log(paths); 9/* 10[ 11 '/Users/sindresorhus/fun/unicorn/rainbow', 12 '/Users/sindresorhus/fun/foo/bar' 13] 14*/
Returns a Promise
for the path to the created directory.
Returns the path to the created directory.
Type: string
The directory to create.
Type: object
Type: integer
Default: 0o777
The directory permissions.
Type: object
Default: import fs from 'node:fs'
Use a custom fs
implementation. For example graceful-fs
.
Using a custom fs
implementation will block the use of the native recursive
option if fs.mkdir
or fs.mkdirSync
is not the native function.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 11/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More