Socket
Book a DemoInstallSign in
Socket

location-china

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

location-china

typescript version for location of china

latest
Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

location-china

Province

toShort

public toShort() {
  // 如果是自治区,只取前两个字
  if (this.name.indexOf('自治区') !== -1) {
    return this.name.substr(0, 2)
  }

  // remove 省 | 市
  return this.name.replace(/[(\u7701)|(\u5E02)]/g, '')
}

FAQs

Package last updated on 21 Jun 2017

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