yow
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "yow", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "You Only Wish module", | ||
@@ -5,0 +5,0 @@ "main": "yow.js", |
@@ -13,3 +13,4 @@ # Yow | ||
- **extend(args)** - Again, just as you would expect. Uses the npm module 'extend'. | ||
- **mkdir(path)** - Creates the directory you specify. It will create multiple directories if they do not exit. | ||
- **mkdir(path)** - Creates the directory you specify. | ||
- **mkpath(path)** - Creates the directory you specify. It will create multiple directories if they do not exit. | ||
- **fileExists(path)** - Nothing fancy, it just returns true/false. | ||
@@ -26,2 +27,2 @@ - **isType(object, type)** - Returns true/false if typeof equals 'type'. | ||
Anything more that you need in **every** Node project? Let me know. | ||
Anything more that you need in just about **every** Node project? Let me know. |
var fs = require('fs'); | ||
module.exports.mkpath = function(path) { | ||
// TODO: Create the entire path | ||
if (!fileExists(path)) { | ||
fs.mkdirSync(path); | ||
} | ||
} | ||
module.exports.mkdir = function(path) { | ||
@@ -4,0 +14,0 @@ |
@@ -22,3 +22,4 @@ module.exports.sprintf = require('sprintf-js').sprintf; | ||
module.exports.mkdir = require('./src/fs.js').mkdir; | ||
module.exports.mkpath = require('./src/fs.js').mkpath; | ||
module.exports.fileExists = require('./src/fs.js').fileExists; | ||
9380
231
26