code: function (a, b) {
      var aNeedsB = false;
      var bNeedsA = false;
  
      aNeedsB = Object.
      keys(a.dependencies).
      some(function (dependency) {
          return dependency === b.name;
      });
  
      if (aNeedsB) {
          return 1;
      }
  
      bNeedsA = Object.
      keys(b.dependencies).
      some(function (dependency) {
          return dependency === a.name;
      });
  
      if (bNeedsA) {
          return -1;
      }
  
      return 0;
  }
docs: Compare two dependencies to determine priority.
  
  @param  {object} a  dependency a
  @param  {object} b  dependency b
  @return {number} the priority of dependency a in comparison to dependency b