mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
import {helper} from '@ember/component/helper';
|
|
|
|
export function formatNumber(number, options) {
|
|
if (number === '' || number === null || number === undefined) {
|
|
return;
|
|
}
|
|
|
|
return Number(number).toLocaleString(undefined, options);
|
|
}
|
|
|
|
export default helper(function ([number]/*, hash*/) {
|
|
return formatNumber(number);
|
|
});
|