aboutsummaryrefslogtreecommitdiff
path: root/src/utils.pug
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.pug')
-rw-r--r--src/utils.pug7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils.pug b/src/utils.pug
index 17d1763..82876de 100644
--- a/src/utils.pug
+++ b/src/utils.pug
@@ -1,4 +1,9 @@
1- var fmtnum = (n)=>n>=1000?(n/1000).toFixed(1)+'k':n; 1-
2 function fmtnum(n) {
3 return n >= 1e6 ? (n / 1e6).toFixed(1) + 'mil' :
4 n >= 1e3 ? (n / 1e3).toFixed(1) + 'k' :
5 n;
6 }
2- var fmttxt = (n,t)=>`${t}${n==1?'':'s'}` 7- var fmttxt = (n,t)=>`${t}${n==1?'':'s'}`
3- var stripPrefix = (s, p) => s.startsWith(p) ? s.slice(p.length) : s; 8- var stripPrefix = (s, p) => s.startsWith(p) ? s.slice(p.length) : s;
4- 9-