# chinese-utils

> Utility tools for working with simplified/traditional Chinese characters and Pinyin.

Latest version **0.1.3** (published 2020-04-11) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-04-11 |
| First published | 2019-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | William Lim |
| Maintainers | wlwl2 |
| Keywords | 拼音, 汉语, 中文, chinese, simplified, traditional, pinyin |

## Links

- npm: https://www.npmjs.com/package/chinese-utils
- Repository: https://github.com/wlwl2/chinese-utils
- Issues: https://github.com/wlwl2/chinese-utils/issues
- npm.io page: https://npm.io/package/chinese-utils

## Recent versions

- 0.1.3 (latest) — 2020-04-11
- 0.1.2 — 2019-11-02
- 0.1.1 — 2019-11-02
- 0.1.0 — 2019-08-09

## README

# chinese-utils

Utility tools for working with simplified/traditional Chinese characters and
Pinyin in Node.js.

## Installation

```bash
npm i chinese-utils --save
```

## Usage

### pinyinToAlphabet()

`ChineseUtils.pinyinToAlphabet(string)`

Removes the tone marks from a Pinyin `string` and keeps the original case of the
Pinyin and any spaces/whitespace. This is also known as accent folding.

Returns a `string` with just plain English and no tone marks (keeps the original
case of the Pinyin).

#### Example:

```js
const ChineseUtils = require('chinese-utils');

const examplePinyin = ChineseUtils.pinyinToAlphabet('wǒ mèi mei');

console.log(examplePinyin); // logs 'wo mei mei'
```

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