switch-chinese 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/package.json +13 -9
  2. package/readme.md +12 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switch-chinese",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Convert between simplified and traditional Chinese characters. 切換正體/簡體中文,超輕量級,支援自訂詞彙與「一簡多繁」轉換,無任何相依性。",
5
5
  "main": "stcasc.lib.js",
6
6
  "type": "module",
@@ -9,19 +9,23 @@
9
9
  "url": "git+https://github.com/hoothin/UserScripts.git#master"
10
10
  },
11
11
  "keywords": [
12
- "Switch",
13
- "Traditional",
14
- "Chinese",
15
- "Simplified",
12
+ "简繁转换",
13
+ "簡繁轉換",
14
+ "简繁切换",
15
+ "簡繁切換",
16
+ "繁简转换",
17
+ "繁簡轉換",
18
+ "繁简切换",
19
+ "繁簡切換",
16
20
  "简体中文",
17
21
  "繁体中文",
18
22
  "簡體中文",
19
23
  "繁體中文",
20
24
  "正體中文",
21
- "简繁切换",
22
- "簡繁切換",
23
- "繁简转换",
24
- "繁簡轉換"
25
+ "Switch",
26
+ "Traditional",
27
+ "Chinese",
28
+ "Simplified"
25
29
  ],
26
30
  "author": "Hoothin",
27
31
  "license": "MIT",
package/readme.md CHANGED
@@ -4,24 +4,28 @@
4
4
 
5
5
  [![NPM](https://img.shields.io/npm/v/switch-chinese.svg)](https://www.npmjs.com/package/switch-chinese) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://www.npmjs.com/package/switch-chinese)
6
6
 
7
+ Install
8
+ ---
9
+ ``` shell
10
+ npm install switch-chinese
11
+ ```
7
12
 
8
13
  演示
9
14
  ---
10
15
  + 基礎用法
11
16
 
12
17
  ``` js
13
- import Stcasc from './stcasc.lib.js';
14
18
  const stcasc = Stcasc();
15
- const sc = "香烟 香烟袅袅 烟雾里 里长面子 吃干面 干 把考卷发回来 卷发 知识产权";
16
- console.log(stcasc.traditionalized(sc));
17
- //香菸 香煙裊裊 煙霧裡 里長面子 吃乾麵 幹 把考卷發回來 捲髮 智慧財產權
19
+ const sc = "简繁转换 繁简切换 香烟 香烟袅袅 烟雾里 里长面子 吃干面 干 把考卷发回来 卷发 知识产权";
20
+ const tc = stcasc.traditionalized(sc);
21
+ console.log(tc);
22
+ //簡繁轉換 繁簡切換 香菸 香煙裊裊 煙霧裡 里長面子 吃乾麵 幹 把考卷發回來 捲髮 智慧財產權
18
23
  ```
19
24
 
20
25
 
21
- + 透過 npm 安裝
26
+ + Import
22
27
 
23
28
  ``` shell
24
- npm install switch-chinese
25
29
  import Stcasc from 'switch-chinese';
26
30
  ```
27
31
 
@@ -35,8 +39,8 @@ stcasc.traditionalized("简体中文");
35
39
  + 轉簡體中文
36
40
 
37
41
  ``` js
38
- stcasc.simplized("正體中文");
39
- //正体中文
42
+ stcasc.simplized("繁體中文");
43
+ //繁体中文
40
44
  ```
41
45
 
42
46
  + 添加快取,避免重複生成字典