|
1 | | -export interface Mappings { |
2 | | - [index: string]: string | string[]; |
3 | | -} |
4 | | -/** |
5 | | - * expect the transliterated value as key, and a string with replacements |
6 | | - */ |
7 | | -export declare let mappings: Mappings; |
8 | | -export interface StringOptions { |
9 | | - /** |
10 | | - * overwrite or pass your own mappings. |
11 | | - * existing mappings will be overwritten, else it'll be appended to defaults |
12 | | - */ |
13 | | - mappings?: Mappings; |
14 | | -} |
15 | | -export interface RegexOptions extends StringOptions { |
16 | | - /** |
17 | | - * RegExp flags, ium. Defaults to i |
18 | | - */ |
19 | | - flags?: string; |
20 | | -} |
21 | | -/** Generate a function that returns a RegExp, that can be reused with the same options */ |
22 | | -export declare function toRegex(options?: RegexOptions): (input: string) => RegExp; |
23 | | -/** Generate a function that returns a string, that can be reused with the same options */ |
24 | | -export declare function toString(options?: StringOptions): (input: string) => string; |
| 1 | +export interface Mappings { |
| 2 | + [index: string]: string | string[]; |
| 3 | +} |
| 4 | +/** |
| 5 | + * expect the transliterated value as key, and a string with replacements |
| 6 | + */ |
| 7 | +export declare let mappings: Mappings; |
| 8 | +export interface StringOptions { |
| 9 | + /** |
| 10 | + * overwrite or pass your own mappings. |
| 11 | + * existing mappings will be overwritten, else it'll be appended to defaults |
| 12 | + */ |
| 13 | + mappings?: Mappings; |
| 14 | +} |
| 15 | +export interface RegexOptions extends StringOptions { |
| 16 | + /** |
| 17 | + * RegExp flags, ium. Defaults to i |
| 18 | + */ |
| 19 | + flags?: string; |
| 20 | +} |
| 21 | +/** Generate a function that returns a RegExp, that can be reused with the same options */ |
| 22 | +export declare function toRegex(options?: RegexOptions): (input: string) => RegExp; |
| 23 | +/** Generate a function that returns a string, that can be reused with the same options */ |
| 24 | +export declare function toString(options?: StringOptions): (input: string) => string; |
0 commit comments