npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

region-name-kr

v2.0.1

Published

korea region name api

Downloads

31

Readme

region-name-kr

npm npm npm

이 프로젝트는 한국의 지역명을 다루는 라이브러리입니다.

테스트 파일은 test/test.js 에 있습니다.

shortProvinceName2(list, ?allow3words)

  • list : 지역 리스트
  • allow3words : 부울경, 수도권같이 3글자로 된 축약어의 허용 여부

충청남도와 충청북도가 들어있으면 충청도로 줄이고 싶을때, list내에 있는 다음과 같은 지역명을 축약시킵니다.

  • 전북 + 전남 = 전라
  • 전북 + 전남 + 광주 = 호남
  • 경북 + 경남 = 경상
  • 경북 + 경남 + 부산 + 대구 + 울산 = 영남
  • 경남 + 부산 + 울산 = 부울경
  • 충북 + 충남 = 충청
  • 충북 + 충남 + 세종 = 호서
  • 서울 + 인천 = 경인
  • 서울 + 인천 + 경기 = 수도권

shortProvinceName(list)

부산 광역시 처럼 띄어쓰기가 되있는 경우, 부산광역시trim됩니다.

다음과 같은 지역명을 축약시킵니다.

  • 전라북도 + 전라남도 = 전라도
  • 전라북도 + 전라남도 + 광주광역시 = 호남 지방
  • 경상북도 + 경상남도 = 경상도
  • 경상북도 + 경상남도 + 부산광역시 + 대구광역시 + 울산광역시 = 영남 지방
  • 경상남도 + 부산광역시 + 울산광역시 = 부울경
  • 충청북도 + 충청남도 = 충청도
  • 충청북도 + 충청남도 + 세종특별자치시 = 호서 지방
  • 서울특별시 + 인천광역시 = 경인 지방
  • 서울특별시 + 인천광역시 + 경기도 = 수도권

japanese(list, mode = 2)

시도, 시군구를 일본어로 번역합니다.

부산 광역시 처럼 띄어쓰기가 되있는 경우, 부산광역시trim됩니다.

mode

mode가 0일 경우 한자(世宗特別自治市)로 반환됩니다.

mode가 1일 경우 카타카나(セジョントゥクピョルジャチシ)로 반환합니다.

mode가 2일 경우 한자, 카타카나 병기(世宗(セジョン)特別自治市)로 반환합니다.

고성군의 경우 고성군(경남), 고성군(강원)으로 구분해야 변환이 가능합니다.

기본 예시

  • 특별/광역시/도 : 세종특별자치시世宗(セジョン)特別自治市
  • 특별/광역시 구/군 :서울특별시 강남구ソウル特別市 永登浦(ヨンドゥンポ)区
  • 도 시/군 : 강원도 평창군江原(カンウォン)道 平昌(ピョンチャン)郡
  • 도 시 구 : 경기도 수원시 권선구京畿(キョンギ)道 水原(スウォン)市 勧善(クォンソン)区

class

클래스로 사용하려면 아래와 같은 코드를 사용하세요.

import RegionKr from 'region-name-kr/region-kr;

모든 메소드는 static 입니다.