mkdirp nodejs

2014-03-12

Because VanillaJS.

Code:
function mkdirp(path){
var parts = path.split('/');
var now = '';
while (parts.length) {
now += parts.shift() + '/';
if (!fs.existsSync(now)) {
fs.mkdirSync(now);
}
}
}