-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
606 additions
and
360 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,24 +1,24 @@ | ||
export interface Mappings { | ||
[index: string]: string | string[]; | ||
} | ||
/** | ||
* expect the transliterated value as key, and a string with replacements | ||
*/ | ||
export declare let mappings: Mappings; | ||
export interface StringOptions { | ||
/** | ||
* overwrite or pass your own mappings. | ||
* existing mappings will be overwritten, else it'll be appended to defaults | ||
*/ | ||
mappings?: Mappings; | ||
} | ||
export interface RegexOptions extends StringOptions { | ||
/** | ||
* RegExp flags, ium. Defaults to i | ||
*/ | ||
flags?: string; | ||
} | ||
/** Generate a function that returns a RegExp, that can be reused with the same options */ | ||
export declare function toRegex(options?: RegexOptions): (input: string) => RegExp; | ||
/** Generate a function that returns a string, that can be reused with the same options */ | ||
export declare function toString(options?: StringOptions): (input: string) => string; | ||
export interface Mappings { | ||
[index: string]: string | string[]; | ||
} | ||
/** | ||
* expect the transliterated value as key, and a string with replacements | ||
*/ | ||
export declare let mappings: Mappings; | ||
export interface StringOptions { | ||
/** | ||
* overwrite or pass your own mappings. | ||
* existing mappings will be overwritten, else it'll be appended to defaults | ||
*/ | ||
mappings?: Mappings; | ||
} | ||
export interface RegexOptions extends StringOptions { | ||
/** | ||
* RegExp flags, ium. Defaults to i | ||
*/ | ||
flags?: string; | ||
} | ||
/** Generate a function that returns a RegExp, that can be reused with the same options */ | ||
export declare function toRegex(options?: RegexOptions): (input: string) => RegExp; | ||
/** Generate a function that returns a string, that can be reused with the same options */ | ||
export declare function toString(options?: StringOptions): (input: string) => string; |
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
Oops, something went wrong.