audit.js
function getDepsFromDataObject(data, lookup) {
  var results = {};
  if (categories.length == 0) {
    for(var k in data.dependencies) {
      var dep = extractDep(data.dependencies[k]);
      results[k]=dep;
    }
  }

  if (lookup) {
    for (var i = 0; i < categories.length; i++) {
      var category = categories[i];
      for(var k in data[category]) {
        var spec = k + "@" + data[category][k];

        var specMatch = lookupSpecMatch(lookup, spec);

        // If there is no match in the lookup then this dependency was "deduped"
        if (specMatch) {
          results[k]=specMatch;
        }
      }
    }
  }
  return results;
}
function getDepsFromDataObject(data, lookup) {
  var results = {};
  if (categories.length == 0) {
    for(var k in data.dependencies) {
      var dep = extractDep(data.dependencies[k]);
      results[k]=dep;
    }
  }

  if (lookup) {
    for (var i = 0; i < categories.length; i++) {
      var category = categories[i];
      for(var k in data[category]) {
        var spec = k + "@" + data[category][k];

        var specMatch = lookupSpecMatch(lookup, spec);

        // If there is no match in the lookup then this dependency was "deduped"
        if (specMatch) {
          results[k]=specMatch;
        }
      }
    }
  }
  return results;
}
function getDepsFromDataObject ( data , lookup ) { var results = { } ; if ( categories . length == 0 ) { for ( var k in data . dependencies ) { var dep = extractDep ( data . dependencies [ k ] ) ; results [ k ] = dep ; } } if ( lookup ) { for ( var i = 0 ; i < categories . length ; i ++ ) { var category = categories [ i ] ; for ( var k in data [ category ] ) { var spec = k + "@" + data [ category ] [ k ] ; var specMatch = lookupSpecMatch ( lookup , spec ) ; // If there is no match in the lookup then this dependency was "deduped" if ( specMatch ) { results [ k ] = specMatch ; } } } } return results ; }
Get the dependencies from an npm object. The exact dependencies retrieved
depend on categories requested by the user.
Get the dependencies from an npm object . The exact dependencies retrieved depend on categories requested by the user .