Skip to content

Commit 054c3b1

Browse files
committed
Update README.md
1 parent 17edcec commit 054c3b1

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
7+
## [1.0.0]
8+
### Changed
9+
- Requires Node.js 7.6.0 for async/await statement
10+
- Remove dependencies to Bluebird
11+
- Remove web browser support (will redo later)
12+
- Updated database

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ OpenCC is a translation library for Traditional and Simplified Chinese with dict
77
`node-opencc` is a brand new project that imports OpenCC database and test case, and translates text without installing any native components.
88

99
## Usage
10-
You can only access `node-opencc` programmatically. Since dictionaries are huge, they are loaded asynchronously with Promise interface. Thus, all translations on `node-opencc` will return `thenable`.
10+
11+
You can only access `node-opencc` programmatically. Since dictionaries are huge, they are loaded asynchronously with Promise interface. Thus, all translations on `node-opencc` will be completed in Promise fashion.
1112

1213
For example,
1314

1415
```
1516
const opencc = require('node-opencc');
1617
17-
opencc.hongKongToSimplified('滑鼠').then(result => result === '鼠标');
18-
opencc.traditionalToHongKong('僞').then(result => result === '偽');
18+
await opencc.hongKongToSimplified('滑鼠') === '鼠标';
19+
await opencc.traditionalToHongKong('僞') === '偽';
1920
```
2021

2122
`node-opencc` supports multiple type of translations:
23+
2224
* Hong Kong to Simplified Chinese (`hongKongToSimplified`)
2325
* Simplified Chinese to Hong Kong (`simplifiedToHongKong`)
2426
* Simplified Chinese to Traditional Chinese (`simplifiedToTraditional`)
@@ -37,9 +39,11 @@ Although `node-opencc` tries to redo `OpenCC` with pure JavaScript, there are fe
3739
* Use `withPhrases` options
3840

3941
## Changelog
40-
* 2016-02-25 (0.0.2): First public release
42+
43+
Please refer to change log [here](CHANGELOG.md).
4144

4245
## Contribution
46+
4347
You may want to head to [OpenCC](https://github.com/byvoid/opencc) for dictionary contribution.
4448

4549
Love this extension? [Star](https://github.com/compulim/node-opencc/stargazers) us!

0 commit comments

Comments
 (0)