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 🙏

© 2025 – Pkg Stats / Ryan Hefner

lich-king2

v1.1.1

Published

web

Downloads

26

Readme

LICK-KING2

  • CommonUtils
class CommonUtils {
       /**
        * 判断环境打印日志
        * @param msg
        * @param optionalParams
        */
       static log(msg: any, ...optionalParams: any[]): void;
       /**
        * Set page title in wechat webview.
        * @param {String} title the new title for the current page
        */
       static setDocumentTitle(title: any): void;
       /**
        * 判断是否为微信浏览器
        * @returns {boolean}
        */
       static isWeiXinBrowser(): boolean;
   }
  • CookieUtils
 class CookieUtils {
        /**
         * 保存Cookie
         * @param name  key
         * @param value value
         * @param min   有效时间(min)
         */
        static saveCookie(name: any, value: any, min: any): void;
        /**
         * 读取cookie
         * @param name
         * @returns {any}
         */
        static readCookie(name: any): string;
        /**
         * 移除Cookie
         * @param name
         */
        static removeCookie(name: any): void;
    }
  • DateUtils
class DateUtils {
       class DateUtils {
           static FORMAT_DATE: string;
           static FORMAT_DATETIME: string;
           static FORMAT_TIME: string;
           /**
            * 获取格式化时间 YYYY-MM-DD
            * @param date
            */
           static getDateString(date: any): string;
           /**
            * 获取格式化时间 YYYY-MM-DD HH:mm:ss
            * @param date
            */
           static getDateTimeString(date: any): string;
           /**
            * 获取格式化时间 HH:mm:ss
            * @param date
            */
           static getTimeString(date: any): string;
           /**
            * 获取时间戳
            * @param date
            */
           static getTimeStamp(date: any): number;
           /**
            * 获取自定义的格式化时间
            * @param date
            * @param format
            */
           static getCustomStr(date: any, format: any): string;
       }
   }
  • FormRule
class FormRule {
        static RULE_REQUIRED: {
            required: boolean;
            message: string;
        };
        static RULE_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_POSITIVE_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_NOT_ZERO_POSITIVE_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_TWO_BITS_POSITIVE_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_TWO_BITS_DECIMALS: {
            pattern: RegExp;
            message: string;
        };
        static RULE_NOT_ZERO_TWO_BITS_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_ZERO_TWO_BITS_INTEGER: {
            pattern: RegExp;
            message: string;
        };
        static RULE_PHONE: {
            pattern: RegExp;
            message: string;
        };
        static RULE_TEL_MOBILE: {
            pattern: RegExp;
            message: string;
        };
        static RULE_TEL: {
            pattern: RegExp;
            message: string;
        };
        static RULE_DISCOUNT: {
            pattern: RegExp;
            message: string;
        };
        static RULE_POSTAL_CODE: {
            pattern: RegExp;
            message: string;
        };
        static RULE_EMAIL: {
            pattern: RegExp;
            message: string;
        };
        static RULE_URL: {
            pattern: RegExp;
            message: string;
        };
        static RULE_MAX(ct: any): {
            max: any;
            message: string;
        };
        static RULE_N_BITS_POSITIVE_INTEGER(n: any): {
            pattern: RegExp;
            message: string;
        };
        static RULE_REQUIRED_MSG(msg: any): {
            required: boolean;
            message: any;
        };
        static checkChineseLength: (rule: any, value: any, callback: any, length: any) => void;
    }
  • RegUtils
class RegUtils {
    static REG_INTEGER: RegExp;
    static REG_TWO_FRACTION: RegExp;
    static REG_NOT_ZERO_TWO_BITS_INTEGER: RegExp;
    static REG_ZERO_TWO_BITS_INTEGER: RegExp;
    static REG_MOBILE: RegExp;
    static REG_DISCOUNT: RegExp;
    static REG_POSITIVE_INTEGER: RegExp;
    static REG_NOT_ZERO_POSITIVE_INTEGER: RegExp;
    static REG_TWO_BITS_POSITIVE_INTEGER: RegExp;
    static REG_POSTAL_CODE: RegExp;
    static REG_TEL: RegExp;
    static REG_TEL_MOBILE: RegExp;
    static REG_EMAIL: RegExp;
    static REG_URL: RegExp;
    static checkReg(reg: RegExp, value: any): boolean;
    static checkRegPort(port: any): boolean;
    static checkRegIP(ip: any): boolean;
}
  • HtmlUtils
class HtmlUtils {
    /**
     * 用于处理高清适配后富文本显示异常
     * @param richText
     * @constructor
     */
    static FormatRichText(richText: any): any;
    /**
     * 获取相对颜色
     * @param col
     * @param amt
     * @returns {string}
     * @constructor
     */
    static convertColor(col: any, amt: any): string;
    /**
     * 16进制color转rgba
     * @param col
     * @param opacity
     * @returns {string}
     * @constructor
     */
    static colorConvertRGBA(col: any, opacity: any): string;
    /**
     * 拨打电话
     * @param phone
     */
    static callPhone(phone: any): void;
    /**
     * 模糊手机号
     * @param phone
     */
    static mockPhone(phone: any): any;
}