Skip to content

readest/simplecc-wasm

 
 

Repository files navigation

simplecc-wasm

基于 simplecc-rs 的 opencc 简单替代

编译成 WASM 摆脱编译 Node Addon 的烦恼

npm i simplecc-wasm

Usage

// Node.js
import { simplecc } from "simplecc-wasm";
// const { simplecc } = require("simplecc"); // commonjs
simplecc("发财了去植发", "s2t"); // '發財了去植髮'

// web
import init, { simplecc } from "simplecc-wasm";
await init();
simplecc("发财了去植发", "s2t"); // '發財了去植髮'
// There is a react app in demo/web path

配置 Configurations

Opencc 配置中的一部分

"s2t"
"t2s"
"s2tw"
"s2hk"
"s2twp"
"hk2s"

About

Based on simplecc-rs: A simple OpenCC alternative (WASM)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 57.1%
  • JavaScript 19.7%
  • Makefile 13.9%
  • Dockerfile 7.9%
  • TypeScript 1.4%