Skip to main content
Deno 2 is finally here 🎉️
Learn more

deno-zhconv

Overview

deno-zhconv is a library that supports character conversion in Deno. It performs mutual conversion between full-width and half-width characters and kana.

Installation

リポジトリをクローンし、Denoプロジェクトに追加します。

git clone https://github.com/suwakei/deno-zhconv.git

Usage

convert from HalfWidth to FullWidth

import { h2z } from "./mod.ts";

const result = h2z("Hello, world!");
console.log(result); // "Hello, world!"

convert from HalfWidth to FullWidth

import { z2h } from "./mod.ts";

const result = z2h("Hello, world!");
console.log(result); // "Hello, world!"