# zhutil

> Chinese utils

Latest version **0.6.7** (published 2014-10-19) · 0 weekly downloads

## Install

```sh
npm install zhutil
pnpm add zhutil
yarn add zhutil
bun add zhutil
```

## 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.6.7 |
| Published | 2014-10-19 |
| First published | 2013-08-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.10.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Victor Hsieh |
| Maintainers | victorhsieh |

## Links

- npm: https://www.npmjs.com/package/zhutil
- Repository: https://github.com/victorhsieh/npm-zhutil
- Issues: https://github.com/victorhsieh/npm-zhutil/issues
- npm.io page: https://npm.io/package/zhutil

## Recent versions

- 0.6.7 (latest) — 2014-10-19
- 0.6.5 — 2014-10-10
- 0.6.4 — 2014-07-25
- 0.6.3 — 2014-04-21
- 0.6.1 — 2014-04-20
- 0.6.0 — 2014-04-19
- 0.5.4 — 2013-09-27
- 0.5.3 — 2013-08-09
- 0.5.2 — 2013-08-09
- 0.5.1 — 2013-08-07
- 0.5.0 — 2013-08-07

## README

npm-zhutil
==========
Utils to handle Chinese, e.g. convert Chinese number to decimal.

 * https://npmjs.org/package/zhutil
 * https://github.com/victorhsieh/npm-zhutil

Example
=======
  ```
  zhutil.parseZHNumber('陸佰捌拾玖') === 689

  zhutil.annotate(10987654321) === '109億8765萬4321'

  zhutil.approximate(10987654321, {base: '億'}) === '109億'
  zhutil.approximate(987654321, {base: '億'}) === '9.8億'
  zhutil.approximate(10987654321, {base: '億', extra_decimal: 2}) === '9.87億'
  zhutil.approximate(987654321, {base: '億', smart: false}) === '9億'
  ```

See test/zhutil_test.ls for more example.

Build
=====
  ```
  $ npm run build
  ```

Release
=======
  ```
  $ node_modules/.bin/gulp --require LiveScript build && git add -u build/ && ...
  $ npm version X.Y.Z
  $ (update package.ls ...)
  $ npm publish
  $ git commit; git push; git push --tags
  ```

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