thelounge/client/js/helpers/roundBadgeNumber.js
2019-11-25 20:12:58 +02:00

10 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";
};