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

@esmjs/geo

v1.0.0

Published

中国地理信息(GeoJSON)

Downloads

133

Readme

🚀 特性

  • 🦀 rust爬虫: 使用rust现代系统编程语言编写爬虫来获取中国地理信息,安全性高、速度快并且并发性高
  • 🐹 极快打包: 使用esbuild打包,本质使用go语言打包,拥有极快的打包速度
  • ⚡️ 完全可摇树: 自带Tree-shaking,只对引入的代码进行打包
  • 💫 零依赖: 零Dependencies依赖,只会安装项目本身
  • 🦾 强类型: 使用TypeScript编写,拥有强大的类型推导提示

📦 安装

# npm
npm install @esmjs/geo

# or yarn
yarn add @esmjs/geo

# or pnpm
pnpm add @esmjs/geo

📕 用法

// 如搭配 ECharts 地图组件,@esmjs/geo 还支持中国全省数据,请看下面的速查表
// import { china as geoChina } from "@esmjs/geo"; // 如有命名冲突使用 as 别名即可
import { china } from "@esmjs/geo";
import * as echarts from "echarts/core";

/**
 * 由于 echarts 没有导出 geoJSON 的 GeoJSONSourceInput 类型
 * china 只能导出标准的 GeoJSON 格式类型
 * 如果你的项目是 TypeScript 编写,下面代码加上 //@ts-expect-error 即可
 */
echarts.registerMap("china", { geoJSON: china });

🌍 使用场景

常用于 ECharts 地图组件

🇨🇳 速查表

一个中国,34个省级行政区,23个省、5个自治区、4个直辖市、2个特别行政区

| 中国 | 陕西 | 山西 | 辽宁 | 吉林 | 黑龙江 | | :------: | :--------: | :-------: | :-------: | :------: | :----------: | | china | shaanxi | shanxi | liaoning | jilin | heilongjiang | | 江苏 | 浙江 | 安徽 | 福建 | 江西 | 山东 | | jiangsu | zhejiang | anhui | fujian | jiangxi | shandong | | 河南 | 湖北 | 湖南 | 广东 | 海南 | 四川 | | henan | hubei | hunan | guangdong | hainan | sichuan | | 贵州 | 云南 | 河北 | 甘肃 | 青海 | 台湾 | | guizhou | yunnan | hebei | gansu | qinghai | taiwan | | 广西 | 内蒙古 | 西藏 | 宁夏 | 新疆 | 北京 | | guangxi | neimenggu | xizang | ningxia | xinjiang | beijing | | 天津 | 上海 | 重庆 | 香港 | 澳门 | | | tianjin | shanghai | chongqing | hongkong | aomen | |

🤔 FAQ

许可证

MIT © 2023-present, esmjs