From 8a2ed10e1473cf1b9d5b61be610ddc269e67dedc Mon Sep 17 00:00:00 2001 From: Justin SB Date: Wed, 22 Oct 2014 10:03:42 -0700 Subject: [PATCH] Style fix: use _.map instead of _.each --- tools/utils.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/utils.js b/tools/utils.js index f0938a0ac9..247639b38f 100644 --- a/tools/utils.js +++ b/tools/utils.js @@ -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) {