Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

nkj

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nkj

bundlerRubygems
Version
0.1.0
Version published
Maintainers
1
Created
Source

NKJ

NKJ can judge given chars are included in JIS X 0213 or not.

Installation

Add this line to your application's Gemfile:

gem 'nkj'

Or install it yourself as:

gem install nkj

Usage

require 'nkj'

# `jisx0213?` returns a boolean value whether or not the given all chars are included in JIS X 0213.
NKJ.jisx0213?('aあ!庵') #=> true
NKJ.jisx0213?('髙') #=> false

# `level1?` returns whether or not the given all chars are included Japanse Level1 Kanji.(第一水準)
NKJ.level1?('山') #=> true

# `level2?` returns whether or not the given all chars are included Japanse Level2 Kanji.(第二水準)
NKJ.level2?('丼') #=> true

# `level3?` returns whether or not the given all chars are included Japanse Level3 Kanji.(第三水準)
NKJ.level3?('﨑') #=> true

# `level4?` returns whether or not the given all chars are included Japanse Level4 Kanji.(第四水準)
NKJ.level4?('挻') #=> true

License

The gem is available as open source under the terms of the MIT License.

Special Thanks

NKJ uses "JIS X 0213 Code Mapping Tables" which created by Project X0213. https://x0213.org/codetable/index.en.html

FAQs

Package last updated on 14 Mar 2024

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