pinyin-pro
Advanced tools
Comparing version 3.18.6 to 3.19.0
# 更新日志 | ||
## 3.19.0 | ||
- 【feat】`customPinyin`: `customPinyin` 支持对 `multiple` 和 `polyphonic` 生效 | ||
## 3.18.6 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "pinyin-pro", | ||
"version": "3.18.6", | ||
"version": "3.19.0", | ||
"description": "准确率和性能最优异的汉字转拼音库。获取中文拼音、韵母、声母、声调、首字母,支持拼音匹配", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -0,11 +1,28 @@ | ||
type CustomHandleType = 'add' | 'replace'; | ||
type CustomDictType = 'pinyin' | 'multiple' | 'polyphonic'; | ||
interface CustomPinyinOptions { | ||
/** | ||
* @description: multiple 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
multiple?: CustomHandleType; | ||
/** | ||
* @description: polyphonic 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
polyphonic?: CustomHandleType; | ||
} | ||
/** | ||
* @description: 用户自定义拼音 | ||
* @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 | ||
* @param {CustomPinyinOptions} options multiple/polyphonic 对于 customPinyin 补充词汇的处理 | ||
*/ | ||
export declare function customPinyin(config?: { | ||
[key: string]: string; | ||
}): void; | ||
}, options?: CustomPinyinOptions): void; | ||
export declare const getCustomDict: () => { | ||
[key: string]: string; | ||
}; | ||
export declare const getCustomMultpileDict: () => string[]; | ||
export declare const getCustomPolyphonicDict: () => string[]; | ||
export declare function clearCustomDict(dict: CustomDictType | CustomDictType[]): void; | ||
export declare function hasCustomConfig(): boolean; | ||
export {}; |
export { pinyin } from './core/pinyin'; | ||
export { customPinyin } from './core/custom'; | ||
export { customPinyin, clearCustomDict } from './core/custom'; | ||
export { match } from './core/match'; | ||
@@ -4,0 +4,0 @@ export { html } from './core/html'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
846556
14586