From 7783953fb39ea93aeed0664dd69b691fd062b403 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 25 Aug 2010 13:27:20 -0700 Subject: expose cache.clean --- lib/cache.js | 3 +++ 1 file changed, 3 insertions(+) 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 [ []] function clean (args, cb) { + if (!cb) cb = args, args = [] + if (!args) args = [] var pkg = args.shift() , ver = args.shift() , clean = npm.cache -- cgit v1.2.3