zhconvertor
v2.2.4
Published
Convert Chinese Simp to Trad or Trad to Simp
Downloads
69
Maintainers
Readme
zhConvertor
Convert Chinese Simp to Trad or Trad to Simp
Installation
npm i zhconvertor --save
Usage
- Basic usage
import zhConvertor from 'zhconvertor';
zhConvertor.s2t('发现了家新理发店');
// 發現了家新理髮店
zhConvertor.t2s('測試~');
// 测试~
- All in one method
import zhConvertor, { ConvertType } from 'zhconvertor';
zhConvertor.convert('打扫衛生', ConvertType.t2s);
// 打扫卫生
zhConvertor.convert('打扫衛生', ConvertType.s2t);
// 打掃衛生
zhConvertor.convert('打扫衛生', ConvertType.dont);
// 打扫衛生
License
MIT License