diff options
author | isaacs <i@izs.me> | 2010-08-26 00:27:20 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-08-26 05:01:24 +0400 |
commit | 7783953fb39ea93aeed0664dd69b691fd062b403 (patch) | |
tree | fc218fe77f1a7d23ae0be42024ed270560b41351 | |
parent | 2dbaf0d208b9d23ca3e49848c0fd98b2c253de68 (diff) |
expose cache.clean
-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 |