ember-intl
Version:
Internationalization for Ember projects
13 lines (10 loc) • 314 B
text/typescript
import type { IntlShape } from '@formatjs/intl';
export type FormatNumberParameters = Parameters<
IntlShape<string>['formatNumber']
>;
export function formatNumber(
intlShape: IntlShape,
...[value, formatOptions]: FormatNumberParameters
): string {
return intlShape.formatNumber(value, formatOptions);
}