parse-pinyin 1.0.0 → 1.1.1
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/README.md +0 -5
- 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 -4
- 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/README.md
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
根据您提供的信息,您的包名称为 `parse-pinyin`。我已经注意到在 `package.json` 中名称已经正确设置为 `"parse-pinyin"`。
|
|
2
|
-
|
|
3
|
-
让我为您更新 `README.md` 文件以匹配正确的包名:
|
|
4
|
-
|
|
5
|
-
```markdown
|
|
6
1
|
# parse-pinyin
|
|
7
2
|
|
|
8
3
|
[](https://npmjs.org/package/parse-pinyin)
|
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 };
|