Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

hanzen

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hanzen

UTF-8 halfwidth katakana interconversion functions

latest
Source
npmnpm
Version
0.0.0
Version published
Weekly downloads
850
26.68%
Maintainers
1
Weekly downloads
 
Created
Source

Hanzen NPM version Build Status Coverage Status

Sauce Test Status

UTF-8 halfwidth katakana interconversion functions

Installation

Via npm

$ npm install hanzen --save
var hanzen= require('hanzen');
console.log(hanzen); //object

Via bower

$ bower install hanzen --save
<script src="bower_components/hanzen/hanzen.min.js"></script>
<script>
  console.log(hanzen); //object
</script>

API

.toHankaku(str) -> result

.toZenkaku(str) -> result

引数strに含まれているカタカナ(。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワンガギグゲゴザジズゼゾダヂヅデドバパビピブプベペボポヷヴヺ)の全角・半角の相互変換を行います。 それ以外の文字は置換しません。

var hanzen= require('hanzen');
hanzen.toHankaku('あのイーハトーヴォのすきとおった風');
// 'あのイーハトーヴォのすきとおった風'

hanzen.toZenkaku('あのイーハトーヴォのすきとおった風');
// 'あのイーハトーヴォのすきとおった風'

License

MIT

Keywords

Japanese

FAQs

Package last updated on 16 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts