/japanese-width

A library for conversion of Japanese half/full-width characters.

Primary LanguageTypeScriptMIT LicenseMIT

japanese-width

A library for conversion of Japanese half/full-width characters.

Install

npm install https://github.com/iwstkhr/japanese-width.git

Usage

import { toFullWidth, toHalfWidth } from '@iwstkhr/japanese-width';

// Output "Hello World ! ハローワールド" 2022
console.info(toFullWidth('Hello World ! ハローワールド 2022'));

// Output Hello World ! ハローワールド 2022
console.info(toHalfWidth('Hello World ! ハローワールド 2022'));

License

MIT