|
- import enPH from './locales/variants/en-PH';
- import {
- Numeric,
- } from './utils/numeric';
-
- type Options = {
- groupSeparator: string,
- ordinal: boolean,
- locale?: (xRaw: Numeric, options?: Partial<Omit<Options, 'locale'>>) => string,
- }
-
- type GetNumberName = (number: Numeric, options?: Partial<Options>) => string
-
- const getNumberName: GetNumberName = (number, options = {} as Partial<Options>): string => {
- const {locale = enPH, ...etcOptions} = options;
- return locale(number, etcOptions);
- };
-
- export default getNumberName;
|