# chinese-alphabetize

> To get chinese pinyin or alphabet from chinese. 从汉字提取拼音，返回首字母大写形式；提取首字母，返回大写形式。

Latest version **1.0.5** (published 2022-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install chinese-alphabetize
pnpm add chinese-alphabetize
yarn add chinese-alphabetize
bun add chinese-alphabetize
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-02-23 |
| First published | 2019-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 538.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jonas Hsiao |
| Maintainers | ipxxiao |
| Keywords | alphabetize, chinese, pinyin, letter, alphabet, 中文, 汉字, 拼音, 字母 |

## Links

- npm: https://www.npmjs.com/package/chinese-alphabetize
- Repository: https://github.com/Ipxxiao/alphabetize
- Homepage: https://ipxxiao.github.io/alphabetize
- Issues: https://github.com/Ipxxiao/alphabetize/issues
- npm.io page: https://npm.io/package/chinese-alphabetize

## Recent versions

- 1.0.5 (latest) — 2022-02-23
- 1.0.4 — 2020-12-28
- 1.0.3 — 2020-07-30
- 1.0.2 — 2020-07-23
- 1.0.1 — 2020-07-10
- 0.1.8 — 2020-04-10
- 0.1.7 — 2020-04-10
- 0.1.6 — 2020-01-08
- 0.1.5 — 2019-12-09
- 0.1.4 — 2019-12-03
- 0.1.3 — 2019-11-21
- 0.1.2 — 2019-11-21
- 0.1.1 — 2019-11-21

## README

# Alphabetize &middot; [![NPM version](https://img.shields.io/npm/v/chinese-alphabetize.svg?style=flat)](https://www.npmjs.com/package/chinese-alphabetize) [![Build Status](https://travis-ci.org/Ipxxiao/alphabetize.svg?branch=master)](https://travis-ci.org/Ipxxiao/alphabetize) [![Coverage Status](https://coveralls.io/repos/github/Ipxxiao/alphabetize/badge.svg?branch=master)](https://coveralls.io/github/Ipxxiao/alphabetize?branch=master) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

To get chinese pinyin or alphabet from chinese. 从汉字提取拼音，返回首字母大写形式；提取首字母，返回大写形式。

## Browsers support

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />iOS Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br />Opera |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IE8+ Edge+                                                                                                                                                                                                      | last 10 versions                                                                                                                                                                                                  | last 10 versions                                                                                                                                                                                              | last 2 versions                                                                                                                                                                                               | last 2 versions                                                                                                                                                                                                               | last 2 versions                                                                                                                                                                                           |

## Install

``` base
npm i chinese-alphabetize -S
or
yarn add chinese-alphabetize
```

## Usage

``` javascript
import Alphabetize, { getFullChars, getCamelChars } from 'chinese-alphabetize'
or
const Alphabetize, { getFullChars, getCamelChars } = require('chinese-alphabetize')
```


. **getFullChars（提取拼音，返回首字母大写形式）**
``` javascript
<
Alphabetize.getFullChars('张三')

->
ZhangSan
```

. **getCamelChars（提取首字母，返回大写形式）**
``` javascript
<
Alphabetize.getCamelChars('张三铅')
Alphabetize.getCamelChars('张三铅', { checkPolyphone: true })

->
ZSQ
['ZSQ', 'ZSY']
```

## More
- [MIT License](https://github.com/Ipxxiao/alphabetize/blob/master/LICENSE)
- [Changelog](https://github.com/Ipxxiao/alphabetize/blob/master/CHANGELOG.md)
- [Test Case](https://github.com/Ipxxiao/alphabetize/blob/master/__tests__/index.spec.ts)
- [Docs](https://github.com/Ipxxiao/alphabetize/tree/master/docs)

---
_Source: https://npm.io/package/chinese-alphabetize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
