From: Ajay Bura Date: Sun, 12 Sep 2021 15:12:51 +0000 (+0530) Subject: Added abbreviateNumber for notfication count (#82) X-Git-Tag: v1.3.0^2~14 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=fc0dc8aea070ed02076dbbf8e9f217c309e7083f;p=cinny.git Added abbreviateNumber for notfication count (#82) --- diff --git a/src/util/common.js b/src/util/common.js index 938ced5..f434c5b 100644 --- a/src/util/common.js +++ b/src/util/common.js @@ -28,3 +28,8 @@ export function getEventCords(ev) { detail: ev.detail, }; } + +export function abbreviateNumber(number) { + if (number > 99) return '99+'; + return number; +}