切換簡體中文與正體中文
import Stcasc from './stcasc.lib.js';
let stcasc = Stcasc();
console.log(stcasc.traditionalized("香烟 香烟袅袅 烟雾里 里长面子 吃干面 干 把考卷发回来 卷发"));
//香菸 香煙裊裊 煙霧裡 里長面子 吃乾麵 幹 把考卷發回來 捲髮
npm install switch-chinese
import Stcasc from 'switch-chinese';
stcasc.traditionalized("简体中文");
//簡體中文
stcasc.simplized("正體中文");
//正体中文
let cache = loadCacheAtYourWay();
let stcasc = Stcasc(cache);
saveCacheAtYourWay(stcasc.cache);
const custom = {
"身份": "身分",
"转义": "跳脫",
"转换": "轉檔",
"软件": "軟體"
};
let stcasc = Stcasc(cache, custom);