|
- import enPH from './locales/en-PH'
- import {
- Numeric,
- } from './utils/numeric';
-
- type Options = {
- groupSeparator: string,
- 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
|