mkdirp (which this package was wrapping) itself supports promises now, please switch to that
Or, if you're using the latest Node.js version, fs.mkdir also supports recursive mode and returns promises
Like mkdir -p, but in node.js!
npm install --only=production --save mkdirp-promiseconst mkdirp = require('mkdirp-promise')pattern: String
options: Object or String
Return: Object (Promise)
When it finishes, it will be fulfilled with the first directory made that had to be created, if any.
When it fails, it will be rejected with an error as its first argument.
mkdirp('/tmp/foo/bar/baz')
.then(console.log) //=> '/tmp/foo'
.catch(console.error)The option object will be directly passed to mkdirp.
©️ ahmadnassri.com · License: ISC · Github: @ahmadnassri · Twitter: @ahmadnassri