Git Product home page Git Product logo

chinese-s2t's Introduction

chinese-s2t NPM version Build Status dependencies Status devDependencies Status

关于

简单的字符串替换的简繁体转换模块

Install

shell (node.js)

npm install chinese-s2t

Usage

var Chinese = require('chinese-s2t')
Chinese.s2t('简体转繁体');
Chinese.t2s('繁体转简体');

转换成繁体

var Chinese = require('chinese-s2t')

var s2tResult = Chinese.s2t('那一天,人类终于回想起了,曾经一度被他们所支配的恐怖,还有被囚禁于鸟笼中的那份屈辱。')

console.log(s2tResult)

//那一天,人類終於回想起了,曾經一度被他們所支配的恐怖,還有被囚禁於鳥籠中的那份屈辱。

转换成简体

var Chinese = require('chinese-s2t')

var s2tResult = Chinese.t2s('我們被教導記住**,而不是人,因為人可能失敗,他可能會被捕,他會被殺死,被遺忘,但400年後,**仍可改變世界,我親眼目睹了,**的威力,我見過人們以它為名殺戮,或是為了它獻出生命,但你不能親吻**,也不能觸摸它,或擁抱它,**不會流血,不會感到痛苦,它們沒有愛!')

console.log(s2tResult)

//我们被教导记住**,而不是人,因为人可能失败,他可能会被捕,他会被杀死,被遗忘,但400年后,**仍可改变世界,我亲眼目睹了,**的威力,我见过人们以它为名杀戮,或是为了它献出生命,但你不能亲吻**,也不能触摸它,或拥抱它,**不会流血,不会感到痛苦,它们没有爱!

chinese-s2t's People

Contributors

foru17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.