2
0
Fork 0
mirror of https://github.com/thelounge/thelounge synced 2025-02-21 23:58:27 +00:00
thelounge/client/js/helpers/roundBadgeNumber.js
2019-11-25 20:12:58 +02:00

9 lines
159 B
JavaScript

"use strict";
module.exports = function(count) {
if (count < 1000) {
return count.toString();
}
return (count / 1000).toFixed(2).slice(0, -1) + "k";
};