Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 2, 2011
1 parent b649cc4 commit 7781edb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/checkdeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ function _missingDeps(data) {
if (!data.dependencies) return []
return Object.keys(data.dependencies).map(function (name) {
var value = data.dependencies[name]
if (typeof value === "string")
return name
if (typeof value === "string") return name
var subResult = _missingDeps(value)
// not an empty array
if (subResult.length !== 0)
return [name, subResult]
if (subResult.length !== 0) return [name, subResult]
return false
}).filter(function (data) {
return data !== false
Expand Down Expand Up @@ -48,8 +46,9 @@ function checkdeps(args, silent, cb) {
var needsFix = result.filter(Array.isArray).map(function(arr) {
return arr[0]
})
if (needsFix.length)
if (needsFix.length) {
objectives.push('to fix '+coolJoin(needsFix))
}
objectives = objectives.join(' and ')
resultstr += '\nPlease execute "npm install" '+objectives
}
Expand Down

0 comments on commit 7781edb

Please sign in to comment.