function getDependenciesFromPackageFiles (packagePaths, packageJsonContents) {
  return _.compact(_.uniqWith(_.flatten(packagePaths.map(path => {
    return _.flatten(
      ['dependencies', 'devDependencies', 'optionalDependencies'].map(type => {
        if (packageJsonContents[path]) {
          return _.map(packageJsonContents[path][type], (version, name) => ({ name, version, type }))
        }
      })
    )
  })), _.isEqual))
}
function getDependenciesFromPackageFiles (packagePaths, packageJsonContents) {
  return _.compact(_.uniqWith(_.flatten(packagePaths.map(path => {
    return _.flatten(
      ['dependencies', 'devDependencies', 'optionalDependencies'].map(type => {
        if (packageJsonContents[path]) {
          return _.map(packageJsonContents[path][type], (version, name) => ({ name, version, type }))
        }
      })
    )
  })), _.isEqual))
}
function getDependenciesFromPackageFiles ( packagePaths , packageJsonContents ) { return _ . compact ( _ . uniqWith ( _ . flatten ( packagePaths . map ( path => { return _ . flatten ( [ 'dependencies' , 'devDependencies' , 'optionalDependencies' ] . map ( type => { if ( packageJsonContents [ path ] ) { return _ . map ( packageJsonContents [ path ] [ type ] , ( version , name ) => ( { name , version , type } ) ) } } ) ) } ) ) , _ . isEqual ) ) }
expects an array of package.json paths, returns an array of unique dependencies from those package.jsons: /*
Returns:
[{
name: '@finnpauls/dep',
version: '1.0.0',
type: 'devDependencies'
}]
expects an array of package . json paths returns an array of unique dependencies from those package . jsons : / * Returns : [ { name :