# hwfw-convert

> A simple converter between half width and full width character.

Latest version **1.2.1** (published 2017-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install hwfw-convert
pnpm add hwfw-convert
yarn add hwfw-convert
bun add hwfw-convert
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2017-10-30 |
| First published | 2017-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Yanbin Ma |
| Maintainers | ybm |
| Keywords | half, full, width, character, convert, tranform |

## Links

- npm: https://www.npmjs.com/package/hwfw-convert
- Repository: https://github.com/myanbin/hwfw-convert
- Homepage: https://github.com/myanbin/hwfw-convert#readme
- Issues: https://github.com/myanbin/hwfw-convert/issues
- npm.io page: https://npm.io/package/hwfw-convert

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2017-10-30
- 1.2.0 — 2017-09-25
- 1.1.0 — 2017-09-08
- 1.0.2 — 2017-09-06
- 1.0.1 — 2017-09-01
- 1.0.0 — 2017-09-01

## README

# hwfw-convert

A simple converter between half width and full width character.


## Install

```sh
npm install --save
```


## Usage

```js
const convert = require('../convert.js');

const text = `岷江流域水质改善明显，优良水体占比同比上升０．５％。`;
const half = convert.full2half(full, options);
// Result: 岷江流域水质改善明显，优良水体占比同比上升0.5%。
const full = convert.half2full(half, options);
// Result: 岷江流域水质改善明显，优良水体占比同比上升０．５％。
```


## Options

```js
const options = {
  digit: true,              // 将全角数字转换成半角
  alpha: true,              // 将全角字母转换成半角
  space: true,              // 将全角空格转换成半角
  symbol: true,             // 将全角的 #、$、%、& 等特殊字符转换成半角（不包括中文标点符号）
  punctucation: false,      // 将中文标点符号转换成对应英文标点符号（在中文环境中不推荐使用）
  smart_mode: true,         // 智能模式。可以识别出数值、网址等内容并进行精确转换
};
```


## Issue

https://github.com/myanbin/hwfw-convert/issues

## License

[MIT](https://github.com/myanbin/hwfw-convert/blob/master/LICENSE.md)

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