pinyin-split
Version:
Split up any kind of Pinyin into an array of syllables.
22 lines (21 loc) • 804 B
TypeScript
/**
*
* @param text (non-spaced) text to split into Pinyin syllables
*/
export declare function split(text: string): string[];
/**
*
* @param text (non-spaced) text to split into Pinyin syllables
* @param everything include non-Pinyin text in result
*/
export declare function split(text: string, everything: boolean): string[];
/**
*
* @param text (non-spaced) text to split into Pinyin syllables
* @param everything include non-Pinyin text in result
* @param wrapInList distinguish Pinyin syllables from non-Pinyin text
* by wrapping them into a 1 value array
*/
export declare function split(text: string, everything: boolean, wrapInList: boolean): string[];
export declare function split(text: string, everything: boolean, wrapInList: true): (string[] | string)[];
export default split;