UNPKG

@yehuthi/hebrew

Version:
64 lines (63 loc) 2.71 kB
/** * @returns true if the given character code is a niqqud (vowel diacritic) character. */ export declare function char_code_is_niqqud(char_code: number): boolean; /** * @returns true if the given character code is a ta'am (cantillation diacritic) character. */ export declare function is_taam_code(char_chode: number): boolean; /** * @returns true if the given character code is a diacritic character (either * niqqud or cantillation). */ export declare function is_diacritic_code(char_code: number): boolean; /** * @returns true if the given character is a diacritic character (either niqqud or cantillation). */ export declare function char_diacritic(char_code: string): boolean; /** * @returns true if the given character is a niqqud (vowel diacritic) character. */ export declare function char_niqqud(char_code: string): boolean; /** * @returns true if the given character is a ta'am (cantillation diacritic) character. */ export declare function char_taam(char_code: string): boolean; /** * Removes diacritics from the given string. * @param input The input string. * @param type The type of diacritics to remove. Must be one of: * - {@link char_diacritic}: removes all diacritics (default). * - {@link char_niqqud}: removes all niqqud diacritics. * - {@link char_taam}: removes all ta'am diacritics. * @returns The input string with the desired diacritics removed. */ export declare function remove_diacritics(input: string, type?: (charCode: string) => boolean): string; /** * Converts a character code from Hebrew script to Paleo-Hebrew script. * * This function is unchecked, meaning it assumes the character code belongs * to the Hebrew script, and otherwise returns an undefined value. */ export declare function char_code_to_paleo_unchecked(char_code: number): number; /** * Converts a character code from Hebrew script to Paleo-Hebrew script. * * If the character code is not in the Hebrew script, returns undefined. */ export declare function char_code_to_paleo(char_code: number): number | undefined; /** * Converts the given character from Hebrew script to Paleo-Hebrew script. * * This function is unchecked, meaning it assumes the character belongs * to the Hebrew script, and otherwise returns an undefined value. */ export declare function char_to_paleo_unchecked(char: string): string; /** * Converts a character from Hebrew script to Paleo-Hebrew script. * * If the character code is not in the Hebrew script, returns undefined. */ export declare function char_to_paleo(char: string): string | undefined; /** Replaces the Hebrew characters in a string to their Paleo-Hebrew equivalent. */ export declare function to_paleo(str: string): string;