Skip to content

Commit 188a1a6

Browse files
committed
Add userid and rename filter function
As a reserved word, filter was conflicting with the browser. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent af29fbb commit 188a1a6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

generate-stats.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ function generateTemplate(data) {
7979
8080
var rowsString = '';
8181
82-
function filter(array) {
83-
return array.filter(function(value, index, arr) {
84-
return value.length && !exclude.includes(value[0]);
82+
function filterContributors(arr) {
83+
return arr.filter(function(value, index, arr) {
84+
var userid = value[0]
85+
return exclude.includes(userid) == false
8586
});
8687
}
8788
@@ -101,7 +102,8 @@ function generateTemplate(data) {
101102
return figure;
102103
}
103104
104-
shuffle(filter(contributors));
105+
var filtered = filterContributors(contributors);
106+
shuffle(filtered);
105107
106108
function buildRows(rowSet) {
107109
rows.forEach(r => {

0 commit comments

Comments
 (0)