diff options
-rw-r--r-- | lib/cache.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cache.js b/lib/cache.js index 8ff20e913..d2e820b98 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -1,6 +1,7 @@ exports = module.exports = cache exports.read = read +exports.clean = clean exports.unpack = unpack var mkdir = require("./utils/mkdir-p") @@ -72,6 +73,8 @@ function ls (args, cb) { // npm cache clean [<pkg> [<ver>]] function clean (args, cb) { + if (!cb) cb = args, args = [] + if (!args) args = [] var pkg = args.shift() , ver = args.shift() , clean = npm.cache |