zhconvertor
TypeScript icon, indicating that this package has built-in type declarations

2.2.4 • Public • Published

zhConvertor

Convert Chinese Simp to Trad or Trad to Simp

Installation

npm i zhconvertor --save

Usage

  1. Basic usage
import zhConvertor from 'zhconvertor';

zhConvertor.s2t('发现了家新理发店');
// 發現了家新理髮店

zhConvertor.t2s('測試~');
// 测试~
  1. All in one method
import zhConvertor, { ConvertType } from 'zhconvertor';

zhConvertor.convert('打扫衛生', ConvertType.t2s);
// 打扫卫生

zhConvertor.convert('打扫衛生', ConvertType.s2t);
// 打掃衛生

zhConvertor.convert('打扫衛生', ConvertType.dont);
// 打扫衛生

License

MIT License

Package Sidebar

Install

npm i zhconvertor

Weekly Downloads

16

Version

2.2.4

License

MIT

Unpacked Size

222 kB

Total Files

26

Last publish

Collaborators

  • elpwc