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

mkdirp

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkdirp - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

test/umask_sync.js

2

examples/pow.js
var mkdirp = require('mkdirp');
mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
mkdirp('/tmp/foo/bar/baz', function (err) {
if (err) console.error(err)
else console.log('pow!')
});

@@ -7,3 +7,6 @@ var path = require('path');

function mkdirP (p, mode, f) {
if (mode === undefined) throw new Error('mode not specified');
if (typeof mode === 'function' || mode === undefined) {
f = mode;
mode = 0777 & (~process.umask());
}

@@ -42,3 +45,5 @@ var cb = f || function () {};

mkdirP.sync = function sync (p, mode) {
if (mode === undefined) throw new Error('mode not specified');
if (mode === undefined) {
mode = 0777 & (~process.umask());
}

@@ -45,0 +50,0 @@ if (typeof mode === 'string') mode = parseInt(mode, 8);

{
"name" : "mkdirp",
"description" : "Recursively mkdir, like `mkdir -p`",
"version" : "0.2.1",
"version" : "0.2.2",
"author" : "James Halliday <mail@substack.net> (http://substack.net)",

@@ -6,0 +6,0 @@ "main" : "./index",

Sorry, the diff of this file is not supported yet

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