getcontributors
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -35,11 +35,2 @@ // Generated by CoffeeScript 1.6.2 | ||
} | ||
contributorData.name || (contributorData.name = contributorData.username); | ||
contributorData.url || (contributorData.url = "https://github.com/" + contributorData.username); | ||
contributorData.text = []; | ||
contributorData.text.push(contributorData.name); | ||
if (contributorData.email) { | ||
contributorData.text.push("<" + contributorData.email + ">"); | ||
} | ||
contributorData.text.push("(" + contributorData.url + ")"); | ||
contributorData.text = contributorData.text.join(' ') || null; | ||
contributorData.id = contributorData.username.toLowerCase(); | ||
@@ -57,3 +48,3 @@ existingContributorData = (_ref1 = contributors[_name = contributorData.id]) != null ? _ref1 : contributors[_name] = {}; | ||
}).once('complete', function(err) { | ||
var contributorData, contributorsSortedArray, contributorsSortedObject, key; | ||
var comparator, contributorData, contributorsSortedArray, contributorsSortedObject, ensurer, key; | ||
@@ -63,13 +54,15 @@ if (err) { | ||
} | ||
contributorsSortedArray = ((function() { | ||
var _results; | ||
_results = []; | ||
for (key in contributors) { | ||
if (!__hasProp.call(contributors, key)) continue; | ||
contributorData = contributors[key]; | ||
_results.push(contributorData); | ||
ensurer = function(contributorData) { | ||
contributorData.name || (contributorData.name = contributorData.username); | ||
contributorData.url || (contributorData.url = "https://github.com/" + contributorData.username); | ||
contributorData.text = []; | ||
contributorData.text.push(contributorData.name); | ||
if (contributorData.email) { | ||
contributorData.text.push("<" + contributorData.email + ">"); | ||
} | ||
return _results; | ||
})()).sort(function(a, b) { | ||
contributorData.text.push("(" + contributorData.url + ")"); | ||
contributorData.text = contributorData.text.join(' ') || null; | ||
return contributorData; | ||
}; | ||
comparator = function(a, b) { | ||
var A, B; | ||
@@ -86,3 +79,14 @@ | ||
} | ||
}); | ||
}; | ||
contributorsSortedArray = ((function() { | ||
var _results; | ||
_results = []; | ||
for (key in contributors) { | ||
if (!__hasProp.call(contributors, key)) continue; | ||
contributorData = contributors[key]; | ||
_results.push(contributorData); | ||
} | ||
return _results; | ||
})()).map(ensurer).sort(comparator); | ||
contributorsSortedObject = (function() { | ||
@@ -89,0 +93,0 @@ var _i, _len, _results; |
{ | ||
"name": "getcontributors", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Fetch the contributors of the repositories of the specified github users", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/getcontributors", |
12802
174