NPM Smell 🍑💨

trivial and outdated NPM packages

make-dir outdated npm logo

Creates a directory and all its parent directories automatically

Weekly Downloads
45,629,117
Dependencies
0
Latest Release
4 months ago
Switch to the native implementation.
Outdated
First version with native support
Node.js 10.12.0
added to Node.js
7 years ago

Historically, Node.js’s mkdir function could only create a single directory at a time, which made creating nested directories cumbersome. To address this limitation, this package was created to simplify nested directory creation.

Today, Node.js widely supports the recursive option for mkdir, which makes this package obsolete.

Note: As of version 5, the library is shipped as ESM and requires at least Node.js 18, so if you are using version 5, you already have builtin support for the recursive flag.

fs.mkdir("data/uploads/images", { recursive: true }, err => {
    if (err) throw err;
    console.log("Directory created");
});