From 9c45afc8964e1120b95064e95ee8588a258e65b0 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Thu, 7 Jun 2018 14:00:14 -0500 Subject: [PATCH] use js toLocaleString rather than custom insert commas function ref #272 --- src/FilterLists.Web/ClientApp/components/Home.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index adf13e0e7..14f2a09ec 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -58,17 +58,12 @@ export class Home extends React.Component, IHomeState> { private static renderTagline(state: IHomeState) { return

- The independent, comprehensive directory of {this.insertCommasInNumber(state.ruleCount) + The independent, comprehensive directory of {state.ruleCount.toLocaleString() } unique rules across {state.lists.length } filter and host lists for advertisements, trackers, malware, and annoyances.

; } - //https://stackoverflow.com/a/2901298/2343739 - private static insertCommasInNumber(num: number) { - return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); - } - private static renderFilterListsTable(filterLists: IListDto[]) { return