mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
topics trim
This commit is contained in:
parent
5898d77828
commit
96c2fb4b7b
2 changed files with 3 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ const pages = [
|
||||||
'JavaScript',
|
'JavaScript',
|
||||||
'React',
|
'React',
|
||||||
'Node',
|
'Node',
|
||||||
|
'CSS',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@ export function tags() {
|
||||||
// sort and filter for any tags that only have 1
|
// sort and filter for any tags that only have 1
|
||||||
const tags = Object.entries(counts)
|
const tags = Object.entries(counts)
|
||||||
.sort(([, countA], [, countB]) => countB - countA)
|
.sort(([, countA], [, countB]) => countB - countA)
|
||||||
.filter(([, count]) => count > 1)
|
// Only show the tag if this topic has 3 or more people in it
|
||||||
|
.filter(([, count]) => count >= 3)
|
||||||
.map(([name, count]) => ({ name, count }));
|
.map(([name, count]) => ({ name, count }));
|
||||||
|
|
||||||
return [{ name: 'all', count: people.length }, ...tags];
|
return [{ name: 'all', count: people.length }, ...tags];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue