Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

style

  • Loading branch information...
commit 7781edb0f5b0ed51d2471f3b17dd71c50b3d0a3e 1 parent b649cc4
@isaacs isaacs authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/checkdeps.js
View
9 lib/checkdeps.js
@@ -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
@@ -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
}
Please sign in to comment.
Something went wrong with that request. Please try again.