Skip to content

Commit 5fb19a1

Browse files
committed
update Readme and dependency
1 parent 2f52495 commit 5fb19a1

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

Readme.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,19 @@ toneConvert('Zhong1guo2ren2 ai4 he1 cha2 hai2shi5 ka1fei1?')
2323
// Zhōngguórén ài hē chá háishi kāfēi?
2424
```
2525

26-
## Conversion Algorithm
26+
## Options
2727

28+
Under the hood this library uses `pinyin-tone-parse` library and thus passes `options` object directly to it. Look for all available options [here](https://github.com/oleglegun/pinyin-tone-parse#options).
29+
30+
```js
31+
const toneConvert = require('pinyin-tone-convert')
32+
33+
toneConvert('pinyin...', options)
34+
```
35+
36+
## Conversion Rules
37+
38+
This library works based on these rules:
2839
1. `a` and `e` trump all other vowels and always take the tone mark.
2940
2. In the combination `ou`, `o` takes the mark.
3041
3. In all other cases, the final vowel takes the mark.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pinyin-tone-convert",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Convert Pinyin tone numbers to tone marks.",
55
"main": "index.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/oleglegun/pinyin-tone-convert#readme",
2525
"dependencies": {
26-
"pinyin-tone-parse": "0.0.2"
26+
"pinyin-tone-parse": "0.1.1"
2727
},
2828
"devDependencies": {
2929
"tap": "^12.0.1"

0 commit comments

Comments
 (0)