feature(commander) getDirContent: add checkType

This commit is contained in:
coderaiser 2014-07-04 09:47:39 -04:00
parent 0a354c9dfb
commit 02eeba121e

View file

@ -22,7 +22,9 @@
WIN32 = process.platform === 'win32';
exports.getDirContent = function(path, callback) {
Util.checkArgs(arguments, ['path', 'callback']);
Util.checkArgs(arguments, ['path', 'callback'])
.checkType('path', path, 'string')
.checkType('callback', callback, 'function');
fs.readdir(path, function(error, names) {
if (error)