Open Chinese Convert  0.4.3
A project for conversion between Traditional and Simplified Chinese
 All Data Structures Files Functions Variables Groups Pages
Data Structures | Functions | Variables
Node.js API

Node.js language binding. More...

Data Structures

class  OpenCC
 OpenCC Node.js API. More...
 

Functions

void OpenCC::convert (string input, function callback)
 Converts input text. More...
 
string OpenCC::convertSync (string input)
 Converts input text. More...
 
void OpenCC::setConversionMode (int conversionMode)
 Sets conversion mode. More...
 

Variables

OpenCC CONVERSION_FAST = 0
 Default conversion mode.
 
OpenCC CONVERSION_SEGMENT_ONLY = 1
 Only converts text into segments.
 
OpenCC CONVERSION_LIST_CANDIDATES = 2
 List all candidates of every segment.
 

Detailed Description

Node.js language binding.

Function Documentation

void convert ( string  input,
function  callback 
)

Converts input text.

Parameters
inputInput text.
callbackCallback function(err, convertedText).
string convertSync ( string  input)

Converts input text.

Parameters
inputInput text.
Returns
Converted text.
void setConversionMode ( int  conversionMode)

Sets conversion mode.

Parameters
conversionModeConversion mode.