UserScripts

簡繁自由切換

切換正體/簡體中文,超輕量級,支援自訂詞彙與「一簡多繁」轉換,無任何相依性

NPM License

演示

import Stcasc from './stcasc.lib.js';
const stcasc = Stcasc();
const sc = "香烟 香烟袅袅 烟雾里 里长面子 吃干面 干 把考卷发回来 卷发 知识产权";
console.log(stcasc.traditionalized(sc));
//香菸 香煙裊裊 煙霧裡 里長面子 吃乾麵 幹 把考卷發回來 捲髮 智慧財產權
const stcasc = Stcasc({}, {}, true);
const sc = "知识产权";
console.log(stcasc.traditionalized(sc));
//知識産權
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);
let stcasc = Stcasc({}, {}, true);