Package Exports
- chinese-alphabetize
- chinese-alphabetize/libs/cjs/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chinese-alphabetize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Alphabetize ·

To get chinese pinyin or alphabet from chinese. 从汉字提取拼音,返回首字母大写形式;提取首字母,返回大写形式。
Browsers support
![]() IE / Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
![]() iOS Safari |
![]() Opera |
|---|---|---|---|---|---|
| IE8+ Edge+ | last 10 versions | last 10 versions | last 2 versions | last 2 versions | last 2 versions |
Install
npm i chinese-alphabetize -S
or
yarn add chinese-alphabetizeUsage
import Alphabetize, { getFullChars, getCamelChars } from 'chinese-alphabetize'
or
const Alphabetize, { getFullChars, getCamelChars } = require('chinese-alphabetize'). getFullChars(提取拼音,返回首字母大写形式)
<
Alphabetize.getFullChars('张三')
->
ZhangSan. getCamelChars(提取首字母,返回大写形式)
<
Alphabetize.getCamelChars('张三铅')
Alphabetize.getCamelChars('张三铅', { checkPolyphone: true })
->
ZSQ
['ZSQ', 'ZSY']




