diff --git a/src/components/FeedItem.vue b/src/components/FeedItem.vue index 59e5915..ab18638 100644 --- a/src/components/FeedItem.vue +++ b/src/components/FeedItem.vue @@ -10,7 +10,7 @@ color="grey darken-4 white--text transparent" label > - {{ entry.views }} views + {{ entry.views | thousands_sep }} views {{ entry.title }} @@ -27,5 +27,10 @@ export default { return `https://www.invidio.us/watch?v=${this.entry.id}`; }, }, + filters: { + thousands_sep(number) { + return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); + }, + }, };