$ cnpm install mkdirp2
A maintained fork of the stagnant mkdirp.
Command-line executable and its dependencies removed, this fork is for Nodejs use only.
Extended with a promise method:
mkdirp.promise('tmp/tmp2/file')
.then(() => console.log('Created'))
.catch(err => console.error(`Failed: ${err.message}`))
Copyright 2013 - present © cnpmjs.org