stonev5-utils
Version:
all my utils here
39 lines (38 loc) • 1.05 kB
TypeScript
/**
* 转换中文为拼音的长音和短音形式
* @param name - 中文名称
* @returns 包含长音和短音的对象
* @requires pinyin-pro - 需安装依赖: npm install pinyin-pro
*/
export declare function pinyinLongShort(name: string): {
short: string;
long: string;
};
/**
* 获取中文标题的拼音形式
* @param title - 中文标题
* @returns 包含长音和短音的对象
* @requires pinyin-pro - 需安装依赖: npm install pinyin-pro
*/
export declare function getPinyin(title: string): {
short: string;
long: string;
};
/**
* 获取中文名称的所有可能拼音组合
* @param name - 中文名称
* @param sep - 拼音分隔符
* @returns 包含各种拼音组合的对象
* @requires pinyin-pro - 需安装依赖: npm install pinyin-pro
*/
export declare function pinyinAll(name: string, sep?: string): {
allPY?: undefined;
onePY?: undefined;
pyOnly?: undefined;
originOnly?: undefined;
} | {
allPY: string;
onePY: string;
pyOnly: string;
originOnly: string;
};