-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose locales in an iterable capacity
- Loading branch information
Showing
32 changed files
with
211 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import { ConstructorOf, ConverterOptions, LocaleInterface, ToWordsOptions } from './types'; | ||
import LOCALES from './locales'; | ||
export { LOCALES }; | ||
export declare const DefaultConverterOptions: ConverterOptions; | ||
export declare const DefaultToWordsOptions: ToWordsOptions; | ||
export declare class ToWords { | ||
private options; | ||
private locale; | ||
constructor(options?: ToWordsOptions); | ||
getLocaleClass(): ConstructorOf<LocaleInterface>; | ||
getLocale(): InstanceType<ConstructorOf<LocaleInterface>>; | ||
convert(number: number, options?: ConverterOptions): string; | ||
protected convertNumber(number: number): string[]; | ||
protected convertCurrency(number: number, options?: ConverterOptions): string[]; | ||
protected convertInternal(number: number, trailing?: boolean): string[]; | ||
toFixed(number: number, precision?: number): number; | ||
isFloat(number: number | string): boolean; | ||
isValidNumber(number: number | string): boolean; | ||
isNumberZero(number: number): boolean; | ||
private options; | ||
private locale; | ||
constructor(options?: ToWordsOptions); | ||
getLocaleClass(): ConstructorOf<LocaleInterface>; | ||
getLocale(): InstanceType<ConstructorOf<LocaleInterface>>; | ||
convert(number: number, options?: ConverterOptions): string; | ||
protected convertNumber(number: number): string[]; | ||
protected convertCurrency(number: number, options?: ConverterOptions): string[]; | ||
protected convertInternal(number: number, trailing?: boolean): string[]; | ||
toFixed(number: number, precision?: number): number; | ||
isFloat(number: number | string): boolean; | ||
isValidNumber(number: number | string): boolean; | ||
isNumberZero(number: number): boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ConstructorOf, LocaleInterface } from '../types'; | ||
declare const LOCALES: { | ||
[key: string]: ConstructorOf<LocaleInterface>; | ||
}; | ||
export default LOCALES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ee_EE_1 = __importDefault(require("./ee-EE")); | ||
const en_AE_1 = __importDefault(require("./en-AE")); | ||
const en_BD_1 = __importDefault(require("./en-BD")); | ||
const en_GB_1 = __importDefault(require("./en-GB")); | ||
const en_GH_1 = __importDefault(require("./en-GH")); | ||
const en_IE_1 = __importDefault(require("./en-IE")); | ||
const en_IN_1 = __importDefault(require("./en-IN")); | ||
const en_MM_1 = __importDefault(require("./en-MM")); | ||
const en_MU_1 = __importDefault(require("./en-MU")); | ||
const en_NG_1 = __importDefault(require("./en-NG")); | ||
const en_NP_1 = __importDefault(require("./en-NP")); | ||
const en_PH_1 = __importDefault(require("./en-PH")); | ||
const en_US_1 = __importDefault(require("./en-US")); | ||
const es_ES_1 = __importDefault(require("./es-ES")); | ||
const es_MX_1 = __importDefault(require("./es-MX")); | ||
const fa_IR_1 = __importDefault(require("./fa-IR")); | ||
const fr_BE_1 = __importDefault(require("./fr-BE")); | ||
const fr_FR_1 = __importDefault(require("./fr-FR")); | ||
const gu_IN_1 = __importDefault(require("./gu-IN")); | ||
const hi_IN_1 = __importDefault(require("./hi-IN")); | ||
const ko_KR_1 = __importDefault(require("./ko-KR")); | ||
const mr_IN_1 = __importDefault(require("./mr-IN")); | ||
const nl_SR_1 = __importDefault(require("./nl-SR")); | ||
const pt_BR_1 = __importDefault(require("./pt-BR")); | ||
const tr_TR_1 = __importDefault(require("./tr-TR")); | ||
const LOCALES = { | ||
'ee-EE': ee_EE_1.default, | ||
'en-AE': en_AE_1.default, | ||
'en-BD': en_BD_1.default, | ||
'en-GB': en_GB_1.default, | ||
'en-GH': en_GH_1.default, | ||
'en-IE': en_IE_1.default, | ||
'en-IN': en_IN_1.default, | ||
'en-MM': en_MM_1.default, | ||
'en-MU': en_MU_1.default, | ||
'en-NG': en_NG_1.default, | ||
'en-NP': en_NP_1.default, | ||
'en-PH': en_PH_1.default, | ||
'en-US': en_US_1.default, | ||
'es-ES': es_ES_1.default, | ||
'es-MX': es_MX_1.default, | ||
'fa-IR': fa_IR_1.default, | ||
'fr-BE': fr_BE_1.default, | ||
'fr-FR': fr_FR_1.default, | ||
'gu-IN': gu_IN_1.default, | ||
'hi-IN': hi_IN_1.default, | ||
'ko-KR': ko_KR_1.default, | ||
'mr-IN': mr_IN_1.default, | ||
'nl-SR': nl_SR_1.default, | ||
'pt-BR': pt_BR_1.default, | ||
'tr-TR': tr_TR_1.default, | ||
}; | ||
exports.default = LOCALES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { LocaleConfig, LocaleInterface } from '../types'; | ||
export default class Locale implements LocaleInterface { | ||
config: LocaleConfig; | ||
config: LocaleConfig; | ||
} |
Oops, something went wrong.