prefectural-capital-jp
v1.0.1
Published
Returns the prefectural capital of the entered prefecture.
Downloads
5
Maintainers
Readme
prefectural-capital-jp
Returns the prefectural capital of the entered prefecture.
Installation
npm install prefectural-capital-jp
Usage
Example
const PrefecturalCapitalJp = require('prefectural-capital-jp')
const prefecturalCapitalJp = new PrefecturalCapitalJp()
console.log(prefecturalCapitalJp.find('神奈川県').toJa()) // 横浜市
Inputtable String
Kanji or Kanji(Short) or Katakana or Roman Alphabet
const PrefecturalCapitalJp = require('prefectural-capital-jp')
const prefecturalCapitalJp = new PrefecturalCapitalJp()
// Kanji
console.log(prefecturalCapitalJp.find('神奈川県').toJa()) // 横浜市
// Kanji(Short)
console.log(prefecturalCapitalJp.find('神奈川').toJa()) // 横浜市
// Katakana
console.log(prefecturalCapitalJp.find('カナガワ').toJa()) // 横浜市
// Roman Alphabet
console.log(prefecturalCapitalJp.find('Kanagawa').toJa()) // 横浜市
Output Format
You have the choice of JA or EN.
const PrefecturalCapitalJp = require('prefectural-capital-jp')
const prefecturalCapitalJp = new PrefecturalCapitalJp()
console.log(prefecturalCapitalJp.find('神奈川県').toJa()) // 横浜市
console.log(prefecturalCapitalJp.find('神奈川県').toEn()) // Yokohama