tiny-pinyin
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -49,5 +49,6 @@ 'use strict'; | ||
source: ch | ||
}; | ||
// First check EXCEPTIONS map, then search with UNIHANS table. | ||
};if (ch in EXCEPTIONS) { | ||
// First check EXCEPTIONS map, then search with UNIHANS table. | ||
if (ch in EXCEPTIONS) { | ||
token.type = PINYIN; | ||
@@ -54,0 +55,0 @@ token.target = EXCEPTIONS[ch]; |
@@ -22,6 +22,6 @@ 'use strict'; | ||
'\u94B6': 'KE' // 钶 | ||
}; | ||
// Update UNIHANS dict. | ||
};DICT.UNIHANS[91] = '\u4F15'; // FU: 夫 --> 伕 | ||
// Update UNIHANS dict. | ||
DICT.UNIHANS[91] = '\u4F15'; // FU: 夫 --> 伕 | ||
DICT.UNIHANS[347] = '\u4EDA'; // XIAN: 仙 --> 仚 | ||
@@ -28,0 +28,0 @@ DICT.UNIHANS[393] = '\u8BCC'; // ZHOU: 州 --> 诌 |
{ | ||
"name": "tiny-pinyin", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "convert hanzi to pinyin", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,2 @@ | ||
# tiny-pinyin [![Build Status](https://travis-ci.org/creeperyang/pinyin.svg?branch=master)](https://travis-ci.org/creeperyang/pinyin) [![npm version](https://badge.fury.io/js/tiny-pinyin.svg)](https://badge.fury.io/js/tiny-pinyin) | ||
# tiny-pinyin [![Build Status](https://travis-ci.org/creeperyang/pinyin.svg?branch=master)](https://travis-ci.org/creeperyang/pinyin) [![npm version](https://badge.fury.io/js/tiny-pinyin.svg)](https://badge.fury.io/js/tiny-pinyin) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcreeperyang%2Fpinyin.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcreeperyang%2Fpinyin?ref=badge_shield) | ||
@@ -11,3 +11,4 @@ [English Doc](./README_EN.md) | ||
2. 可以轻松处理 **6763** 个的常用汉字,其它汉字未测试,但应该有相当正确率,欢迎测试。 | ||
3. 同时支持 **`node.js (4-10)` 和 浏览器 (safari/chrome/firefox/android 6+/ios)** 。 | ||
3. 同时支持 **`node.js (4-12)` 和 浏览器 (safari/chrome/firefox/android 6+/ios)** 。 | ||
- 但是travis配置将逐渐删除过时的node版本,也推荐使用在维护期的正式node版本。 | ||
@@ -31,2 +32,4 @@ **注意:不支持多音字;`ie/edge` 测试未通过。** | ||
注意在浏览器中使用时页面的charset 必须为utf-8 ,见[issue#21](https://github.com/creeperyang/pinyin/issues/21) | ||
一般情况下,我们的`node.js`只支持英文,所以,我们需要让`node.js`支持中文(`zh-Hans-CN`),即`pinyin.isSupported()`为`true`: | ||
@@ -103,1 +106,5 @@ | ||
非常感谢 [Android Contacts Source Code](https://android.googlesource.com/platform/packages/providers/ContactsProvider/+/0c49720fb3d58e346739c2ccd56ed2b739249e07/src/com/android/providers/contacts/HanziToPinyin.java)。本库由它启发,可以算作Java到JavaScript的一次转译。 | ||
## License | ||
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcreeperyang%2Fpinyin.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcreeperyang%2Fpinyin?ref=badge_large) |
42027
15
754
108