Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@root/mkdirp

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@root/mkdirp

A minimal, zero-dependency mkdirp written in VanillaJS for node.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

mkdirp.js | A Root Project

A zero-dependency, Promise-friendly mkdirp written in VanillaJS for node.

Install

npm install --save @root/mkdirp

Usage

'use strict';

var mkdirp = require('@root/mkdirp')
mkdirp('/path/to/whatever', function (err) {
  if (err) { throw err; }
  console.log("directory now exists");
});

Usage (Promise)

'use strict';

var util = require('util');
var mkdirp = util.promisify(require('@root/mkdirp'));

mkdirp('/path/to/whatever').then(function () {
  console.info("directory now exists");
}).catch(function (err) {
  console.error(err);
});

Why not substack's mkdirp?

We're serious about light, zero-dependency JavaScript.

Fewer dependencies means code that's more easily audited, and less surface area for attacks.

substack's implementation is excellent and well-tested, but it's not Promise / await friendly and it depends on minimist, which isn't necessary because we don't need the commandline usage.

Keywords

FAQs

Package last updated on 16 Apr 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc