Gathering detailed insights and metrics for make-empty-dir
Gathering detailed insights and metrics for make-empty-dir
Gathering detailed insights and metrics for make-empty-dir
Gathering detailed insights and metrics for make-empty-dir
npm install make-empty-dir
Typescript
Module System
Min. Node Version
Node Version
NPM Version
74.3
Supply Chain
78.7
Quality
78
Maintenance
100
Vulnerability
100
License
JavaScript (77.05%)
TypeScript (22.95%)
Total Downloads
594,355
Last Day
380
Last Week
2,904
Last Month
11,666
Last Year
179,065
101 Stars
424 Commits
29 Forks
4 Watching
32 Branches
20 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.2
Package Id
make-empty-dir@3.0.2
Unpacked Size
4.33 kB
Size
2.05 kB
File Count
5
NPM Version
10.8.1
Node Version
20.11.1
Publised On
04 Jul 2024
Cumulative downloads
Total Downloads
Last day
-47.1%
380
Compared to previous day
Last week
-20.1%
2,904
Compared to previous week
Last month
-15.6%
11,666
Compared to previous month
Last year
-10.3%
179,065
Compared to previous year
1
Ensures that a directory is empty
Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted.
It works faster than emptyDir()
of fs-extra
because the contents of the directory are not read before the creation of the directory.
1<npm|yarn|pnpm> add make-empty-dir
1'use strict' 2const makeEmptyDir = require('make-empty-dir') 3 4await makeEmptyDir('dir-name') 5 6// or create the parent dir as well 7await makeEmptyDir('dir/subdir', { recursive: true })
makeEmptyDir(dir: string, [opts]): Promise<'created' | 'emptied'>
Arguments:
dir
- Path - the path of the directory.opts.recursive
- Boolean - Optional. If true, parent directories will be created.Returns:
A string is returned.
'created'
- if there was no directory'emptied'
- if there was a directory and the its contents were removed.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 10/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
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
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
Reason
32 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-13
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