2020-05-26 16:39:53 +03:00
|
|
|
import {helper} from '@ember/component/helper';
|
|
|
|
|
2022-05-31 18:38:43 +03:00
|
|
|
export function formatNumber(number, options) {
|
2022-05-18 11:42:44 +03:00
|
|
|
if (number === '' || number === null || number === undefined) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-05-31 18:38:43 +03:00
|
|
|
return Number(number).toLocaleString(undefined, options);
|
2020-05-26 16:39:53 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export default helper(function ([number]/*, hash*/) {
|
|
|
|
return formatNumber(number);
|
|
|
|
});
|