Permalink
Browse files

no triple-inversion (or whatever) because it causes headaches

  • Loading branch information...
1 parent 3a1194f commit d8f364a33b1fd9ddb7197329daa3a979592290f8 @thejh committed Aug 17, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/checkdeps.js
View
@@ -10,13 +10,13 @@ var npm = require("../npm.js")
checkdeps.usage = "npm checkdeps"
-// returns whether something is NOT ok
+// returns whether something is ok
function _checkdeps(data) {
if (!data.dependencies) return true
- return Object.keys(data.dependencies).some(function (name) {
+ return Object.keys(data.dependencies).every(function (name) {
var value = data.dependencies[name]
if (typeof value === "string")
- return true
+ return false
return _checkdeps(value)
})
}
@@ -30,7 +30,7 @@ function checkdeps(args, silent, cb) {
ls([], true, function(err, data){
if (err) return cb(err, null)
- var result = !_checkdeps(data)
+ var result = _checkdeps(data)
if (silent) return cb(null, result)
if (!silent) {
var resultstr = 'status:'+(result?'ok':

0 comments on commit d8f364a

Please sign in to comment.