Style fix: use _.map instead of _.each

This commit is contained in:
Justin SB
2014-10-22 10:03:42 -07:00
committed by Emily Stark
parent 48b50a8ae2
commit 8a2ed10e14

View File

@@ -100,12 +100,10 @@ exports.hasScheme = function (str) {
exports.printPackageList = function (items, options) {
options = options || {};
var rows = [];
_.each(items, function (item) {
var rows = _.map(items, function (item) {
var name = item.name;
var description = item.description || 'No description';
var row = [ name, description];
rows.push(row);
return [name, description];
});
var alphaSort = function (row) {