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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hz_org/utils

v1.0.4

Published

utils

Readme

@hz_org/utils

前端工具类npm

安装

npm i @hz_org/utils or @hz_org/utils

API

  • 获取浏览器可视区域高度 getClientHeight(): number
  • 百度坐标转高德 bMapConvertGMap(geo: geoType): geoType
  • 高德坐标转百度 gMapConvertBMap(geo: geoType): geoType
  • 对象数组去重 arrayUnique(arr = [], uniId = 'id'): array
  • 深拷贝 deepClone(obj: Object): object
  • 获取UUID getUUID(): number
  • 对象属性复制(以左侧对象为准) leftAssign(obj1: Object, obj2: Object): obj1
  • 生成随机len位数字 randomNumber(length, date): number
  • Element Plus Form 校验银行卡号位数 validateBankCard(rule, value, callback)
  • Element Plus Form 只能输入中文 validateChinese(rule, value, callback)
  • Element Plus Form 校验身份证号 validateIdCard(rule, value = '', callback)
  • Element Plus Form 验证手机号+固定电话 validateLandlineAndTel(rule, value, callback)
  • Element Plus Form 校验手机号码 validateTel(rule, value, callback)

API

  • esModule

    import { getClientHeight } from "@hz_org/utils"
  • cdn

    <script src="https://cdn.jsdelivr.net/npm/@hz_org/utils/index.js"></script>
    
    console.log(window['@hz_org/utils'].getClientHeight())

本地开发

git clone至本地
npm install
src下新建文件编写

打包编译

npm run build

npm 发布

1.更新package.json的version
2.copy根目录下的package.json和README.md至dist目录下
3.cd dist
4.npm login
5.npm publish --access=public