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

dyhei

v1.0.11

Published

dyhei

Readme

使用说明

dyhei

npm i dyhei

import { dyUtils , dyValidate } from 'dyhei'

  • dyUtils

    1. digit 数字前置补零
    1. toDateString 转化为日期格式字符
    1. eachTreeData 遍历 children 形式数据
    1. fullScreen 让浏览器全屏切换
    1. screenWidth 获取屏幕宽度
    1. screenHeight 获取屏幕高度
    1. uuid 获取由大小写英文和数字组成的字符串
    1. random 生成 m 到 n 的随机数,不包含 n
    1. filterObj 过滤对象中为空的属性
  • dyValidate

    1. validatePhone 校验是否是手机或座机
    1. isPhone 是否是手机号
    1. isTel 是否为固话
    1. isEmail 是否是邮箱
    1. isUrl 是否是网址
    1. isNumber 是否是数字
    1. isDate 是否是日期
    1. isIdentity 是否是身份证
    1. isDigits 是否是整数
    1. isDigitsP 是否是正整数
    1. isDigitsN 是否是负整数
    1. isDigitsPZ 是否是非负整数(正整数或 0)
    1. isDigitsNZ 是否是非正整数(负整数或 0)
    1. maxMinLength 验证最小长度、最大长度
    1. maxMin 验证最小值、最大值
    1. isChina 是否是中文
    1. isPort 是否是端口号
    1. isIP 是否是 IP
    1. isLongitude 是否是经度 -180.0~+180.0(整数部分为 0 ~ 180,必须输入 1 到 5 位小数)
    1. isLatitude 是否是纬度 -90.0~+90.0(整数部分为 0 ~ 90,必须输入 1 到 5 位小数)
    1. isIdentityStrong 是否是身份证(强校验)