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

hongfangze-verify

v1.0.0

Published

comm.verify

Readme

数据验证操作类

介绍

验证各类数据的合法有效性

开始使用

npm install hongfangze-verify

// import { isEmailAddress } from "hongfangze-verify";
// import * as verify from "hongfangze-verify";

/**
 * 是否中国手机号码
 * @param {string} tel 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isChineseCellphone: (tel: string) => boolean;
/**
 * 是否邮箱地址
 * @param {string} email 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isEmailAddress: (email: string) => boolean;
/**
 * 是否QQ号码
 * @param {string} qq 需要验证的数据
 * @return {*}  {boolean}
 */
export declare const isQqNumber: (qq: string) => boolean;
/**
 * 是否MD5值
 * @param {string} md5 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isMd5: (md5: string) => boolean;
/**
 * 是否HTTP(HTTPS)的标准协议格式的URL
 * @param {string} url 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isUrl: (url: string) => boolean;
/**
 * 是否标准的32位/36位/38位的Guid格式的值(22位位特殊格式,该函数无法验证)
 * @param {string} guid 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isGuid: (guid: string) => boolean;
/**
 * 是否JSON对象或JSON对象数组
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isJsonOrJsonArray: (obj: any) => boolean;
/**
 * 是否JSON对象
 * @param {*} json 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isJson: (json: any) => boolean;
/**
 * 是否JSON对象数组
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isJsonArray: (obj: any) => boolean;
/**
 * 是否Object对象
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isObject: (obj: any) => boolean;
/**
 * 是否是Error对象
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isError: (obj: any) => boolean;
/**
 * 是否是字符串
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isString: (obj: any) => boolean;
/**
 * 是否是数字
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isNumber: (obj: any) => boolean;
/**
 * 是否Date类型
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isDate: (obj: any) => boolean;
/**
 * 是否NULL类型
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isNull: (obj: any) => boolean;
/**
 * 是否Undefined类型
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isUndefined: (obj: any) => boolean;
/**
 * 是否为中国公民身份证号码
 * @param {string} idcard 要验证的数据
 * @return {{ errcode: number, errmsg: string }} errorcode==0代表成功,否则为失败,并附上errmsg错误原因
 */
export declare const isChineseCitizenIdCardNumber2: (idcard: string) => {
    errcode: number;
    errmsg: string;
};
/**
 * 是否为中国公民身份证号码
 * @param {string} idcard 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isChineseCitizenIdCardNumber: (idcard: string) => boolean;
/**
 * 是否数组对象
 * @param {*} obj 要验证的数据
 * @return {*}  {boolean}
 */
export declare const isArray: (obj: any) => boolean;
/**
 * 检查端口是否已经被占用
 * @param {number} port 端口号
 * @return {*}  {Promise<boolean>}
 */
export declare const portIsUsed: (port: number) => Promise<boolean>;

版本迭代记录

2025-04-11 v1.0.0

  • 被移除后更名发布。