🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

japanese-characters

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

japanese-characters

Hiragana and Katana characters from the Japanese language

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

japanese-characters

Analyze strings to detect if they contain Japanese characters.

Detects Hiragana and Katakana characters.

Installation

npm install japanese-characters

Usage

The module exports an object with three values:

  • hiragana, an array of all the Hiragana characters
  • katakana, an array of all the Katakana characters
  • presentIn(inputString), a function that returns a Boolean indicating whether the given inputString contains Japanese characters
const japaneseCharacters = require('japanese-characters')

console.log(japaneseCharacters.presentIn('ブートキャンプ')
// true

console.log(japaneseCharacters.presentIn('some English string')
// false

Ordered by Frequency

To make searching more efficient, the characters are sorted by frequency of use. This order was determined by counting the number of each characters in the Japanese Wikipedia Corpus.

Tests

npm install
npm test

Dependencies

None

Dev Dependencies

  • lodash: Lodash modular utilities.
  • tap: A Test-Anything-Protocol library for JavaScript

License

MIT

Keywords

japanese

FAQs

Package last updated on 02 Jul 2019

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