You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/app/helpers/format-number.js

11 lines
461 B

import { helper } from '@ember/component/helper';
import callIfType from 'consul-ui/utils/helpers/call-if-type';
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString
export function toLocaleString(num, options) {
// TODO: If I make locale configurable use an option
// not mutiple arguments
return num.toLocaleString(undefined, options);
}
export default helper(callIfType('number')(toLocaleString));