Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2014-05-24 10:42:13 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-06-13 23:41:13 +0400
commit1c2938189122c0640b9403746a6bfed4d6142b27 (patch)
tree8c6c5776818acc47454bb514f58623f05f8f486a /lib/uninstall.js
parent626c3e4a7fb37159b79ab9b3af2c030f26540b0f (diff)
remove dead code and fix jshint warnings
Diffstat (limited to 'lib/uninstall.js')
-rw-r--r--lib/uninstall.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js
index 072d46bcf..42a9a83e0 100644
--- a/lib/uninstall.js
+++ b/lib/uninstall.js
@@ -79,14 +79,15 @@ function saver (args, nm, cb_) {
// don't use readJson here, because we don't want all the defaults
// filled in, for mans and other bs.
fs.readFile(pj, 'utf8', function (er, json) {
+ var pkg
try {
- var pkg = JSON.parse(json)
+ pkg = JSON.parse(json)
} catch (_) {}
if (!pkg) return cb_(null, data)
var bundle
if (npm.config.get('save-bundle')) {
- var bundle = pkg.bundleDependencies || pkg.bundledDependencies
+ bundle = pkg.bundleDependencies || pkg.bundledDependencies
if (!Array.isArray(bundle)) bundle = undefined
}