JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q39746F
  • License AGPL-3.0

通过 IPv4 地址获取用户的地理位置信息,精确到省。

Package Exports

  • ip-china-location
  • ip-china-location/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ip-china-location) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

欢迎使用

该模块用于获取中国区域的省级定位信息(不保证准确),不支持国外定位。

第一次查找所需时间 10ms 左右,非首次查找所需时间 < 1ms。

快速开始

使用 findIPv4 即可查找指定 IP 的定位,使用 findOnVercel 可通过 Vercel 的请求头获取定位信息。

目前 Vercel 平台不支持自动加载数据库,调用 findOnVercelloadDatabase 时需要手动传入路径。