parse-pinyin 1.0.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -4
- package/dist/index.global.js +1 -2
- package/dist/index.js +1 -186
- package/dist/index.mjs +1 -2
- package/package.json +3 -7
- package/dist/generator.d.ts +0 -1
- package/dist/generator.js +0 -272
- package/dist/generator.js.map +0 -1
- package/dist/index.global.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/pinyin.d.ts +0 -5
- package/dist/pinyin.js +0 -9
- package/dist/pinyin.js.map +0 -1
- package/dist/types.d.ts +0 -132
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 音调转换选项
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
type ToneOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* 是否保留音调
|
|
7
7
|
* true: 返回带音调的拼音 (默认)
|
|
@@ -19,7 +19,7 @@ export type ToneOptions = {
|
|
|
19
19
|
/**
|
|
20
20
|
* 极致优化的拼音查询器类
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
declare class UltraOptimizedPinyinJsonQuery {
|
|
23
23
|
private dataset;
|
|
24
24
|
private unicodeMap;
|
|
25
25
|
/**
|
|
@@ -54,5 +54,7 @@ export declare class UltraOptimizedPinyinJsonQuery {
|
|
|
54
54
|
*/
|
|
55
55
|
toHanzi(pinyin: string): string[];
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
declare const toPinyin: (char: string, options?: ToneOptions) => (string | [string, number])[];
|
|
58
|
+
declare const toHanzi: (pinyin: string) => string[];
|
|
59
|
+
|
|
60
|
+
export { type ToneOptions, UltraOptimizedPinyinJsonQuery, toHanzi, toPinyin };
|