Socket
Socket
Sign inDemoInstall

location-china

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    location-china

typescript version for location of china


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

v0.1.7

  • change ChinaCode to '100000', forget to compile.

Readme

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

Last updated on 21 Jun 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc