This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/client/js/helpers/roundBadgeNumber.js

10 lines
152 B
JavaScript
Raw Normal View History

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