
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Recursively and asyncronously make directories in node.js.
I needed this to make RESTful file system caches of rather expensive-to-create database queries on a web server. Other solutions couldn't handle multiple simultaneous creates that you get from asyncronous operation.
To run the test, such as it is
npm install -d
Then
make test
Because I haven't figure out how to put this in the Makefile yet, you'll have to remove the created directories manually. Sorry about that
rm makedirtests/ -rf
rm /tmp/makedirtests/ -rf
To use, just pass the directory that you want to make. It will climb up the directory tree until it finds something that exist, and then will recursively create all of the directories that are needed. Pass it a callback to do something with that directory once it is created. For example
var makedir = require('makedir');
var p = '/home/james/some/crazy/long/path'
function doSomethingToPath(path){
return function(err){
if(err) throw new Error (err);
console.log('made '+path);
};
};
makedir.makedir(p,doSomethingToPath(p));
FAQs
recursively make directories that you need in node.js
The npm package makedir receives a total of 20 weekly downloads. As such, makedir popularity was classified as not popular.
We found that makedir demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.