Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjune committed May 6, 2019
1 parent e58fc1d commit 2cae56d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -54,25 +54,25 @@ script:
根据汉字获取拼音

```js
pinyinUtil.getPinyin('小明', ' '); // xiao ming
getPinyin('小明', ' '); // xiao ming

pinyinUtil.getPinyin('小明', ' ', true); // xiǎo míng
getPinyin('小明', ' ', true); // xiǎo míng

pinyinUtil.getPinyin('小明plus', ' '); // xiao ming plus
getPinyin('小明plus', ' '); // xiao ming plus
```

### getCityPinyin(city, [splitter=''], [withtone=false])
获取城市拼音【城市多音字已处理】

```js
pinyinUtil.getCityPinyin('重庆市'); // chongqingshi
getCityPinyin('重庆市'); // chongqingshi

pinyinUtil.getCityPinyin('西藏', ' ', true); // xī zhàng
getCityPinyin('西藏', ' ', true); // xī zhàng
```

## getHanzi(pinyin)
单个拼音转汉字

```js
pinyinUtil.getHanzi('diu'); // 丟丢銩铥颩
getHanzi('diu'); // 丟丢銩铥颩
```
22 changes: 11 additions & 11 deletions dist/pinyin-util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pinyin-util.min.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "pinyin-util",
"version": "1.1.1",
"version": "1.1.2",
"description": "convert chinese to pinyin",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -44,7 +44,8 @@
"src/**/*.js": "eslint"
},
"dependencies": {
"@babel/core": "^7.4.0",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
Expand All @@ -62,22 +63,21 @@
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/runtime-corejs2": "^7.4.2"
"@babel/runtime-corejs2": "^7.0.0",
"babel-loader": "^8.0.5",
"rimraf": "^2.6.3",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-merge": "^4.2.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.5",
"eslint": "^5.7.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"husky": "^1.1.3",
"lint-staged": "^7.3.0",
"rimraf": "^2.6.2",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-merge": "^4.2.1"
"lint-staged": "^7.3.0"
}
}

0 comments on commit 2cae56d

Please sign in to comment.