Installations
npm install fs-mkdirp-stream
Score
98.1
Supply Chain
86.1
Quality
77.5
Maintenance
100
Vulnerability
100
License
Developer
gulpjs
Developer Guide
Module System
CommonJS
Min. Node Version
>=10.13.0
Typescript Support
No
Node Version
16.14.2
NPM Version
8.11.0
Statistics
8 Stars
24 Commits
7 Forks
6 Watching
1 Branches
5 Contributors
Updated on 05 Nov 2023
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
391,159,814
Last day
-5.3%
381,224
Compared to previous day
Last week
4.8%
2,068,395
Compared to previous week
Last month
19.3%
8,163,838
Compared to previous month
Last year
13.2%
87,337,256
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
fs-mkdirp-stream
Ensure directories exist before writing to them.
Usage
1var { Readable, Writable } = require('streamx'); 2var mkdirpStream = require('fs-mkdirp-stream'); 3 4Readable.from([{ dirname: './path/to/my/', path: './path/to/my/file.js' }]) 5 .pipe( 6 mkdirpStream(function (obj, callback) { 7 // callback can take 3 arguments (err, dirname, mode) 8 callback(null, obj.dirname); 9 }) 10 ) 11 .pipe( 12 new Writable({ 13 write: function (obj, cb) { 14 // This will be called once the directory exists 15 // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' } 16 cb(); 17 }, 18 }) 19 );
API
mkdirpStream(resolver)
Takes a resolver
function or string and returns a streamx.Transform
stream.
If the resolver
is a function, it will be called once per chunk with the signature (chunk, callback)
. The callback(error, dirpath, mode)
must be called with the dirpath
to be created as the 2nd parameter or an error
as the 1st parameter; optionally with a mode
as the 3rd parameter.
If the resolver
is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom mode
can't be used.
License
MIT
Contains a custom implementation of mkdirp
originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/gulpjs/.github/SECURITY.md:1
- Info: Found linked content: github.com/gulpjs/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/gulpjs/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/gulpjs/.github/SECURITY.md:1
Reason
Found 1/22 approved changesets -- score normalized to 0
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
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/dev.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/dev.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/gulpjs/fs-mkdirp-stream/release.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/dev.yml:51
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/dev.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Score
4.1
/10
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