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

mcat_utils

v0.0.9

Published

[TOC]

Readme

MCat方法库

[TOC]

FileUtils(文件处理库)


/**
 * 在线文件下载
 * fileUtils.download (fileUrl, fileName)
 * @param fileUrl 文件地址(在线)
 * @param fileName 下载文件名称(自定义命名)
 */

LocalStorageUtils(本地存储方法库)


/**
 * 设置LocalStorage
 * localStorageUtils.set(key, value);
 * @param key LocalStorage标识
 * @param value LocalStorage值
 */

/**
 * 获取LocalStorage
 * localStorageUtils.get(key);
 * @param key LocalStorage标识
 * @returns LocalStorage值
 */

/**
 * 删除LocalStorage
 * localStorageUtils.del(key);
 * @param key LocalStorage标识
 */

/**
 * 清空LocalStorage
 * localStorageUtils.clear();
 */

SessionStorageUtils(会话存储方法库)


/**
 * 设置SessionStorage
 * sessionStorageUtils.set(key, value);
 * @param key LocalStorage标识
 * @param value LocalStorage值
 */

/**
 * 获取SessionStorage
 * sessionStorageUtils.get(key);
 * @param key LocalStorage标识
 * @returns LocalStorage值
 */

/**
 * 删除SessionStorage
 * sessionStorageUtils.del(key);
 * @param key LocalStorage标识
 */

/**
 * 清空SessionStorage
 * sessionStorageUtils.clear();
 */

IsUtils(判断方法库)


/**
 * 判断数据是否是URL
 * isUtils.url(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 判断数据是否是数组
 * isUtils.array(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 判断数据是否已定义
 * isUtils.defined(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 判断数据是否为空
 * isUtils.empty(data);
 * @param data 被判断数据
 * @param allowBlank {boolean} 是否允许空字符串
 * @returns {boolean|*}
 */

/**
 * 是否是日期
 * isUtils.date(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是对象
 * isUtils.object(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是函数
 * isUtils.functions(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是数值型
 * isUtils.number(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是字符型
 * isUtils.string(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是布尔型
 * isUtils.boolean(data);
 * @param data 被判断数据
 * @returns {boolean}
 */

/**
 * 是否是原始类型
 * isUtils.primitive(data);
 * @param data 被判断数据
 * @returns {*|boolean}
 */

/**
 * 是否可迭代
 * isUtils.iterable(data);
 * @param data 被判断数据
 * @returns {*}
 */