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

mutare

v0.2.0

Published

Some parctical utilities for JavaScript Developer.

Downloads

4

Readme

NPM Version NPM Download JavaScript Style Guide LICENSE

Installation 安裝

$ npm install mutare --save

$ yarn add mutare

Catalog 目录

  • Animation
    • animate 动画函数
    • shake 抖动函数
  • Array
    • 遍历
      • bifurcate 通过映射关系分离数组成员
      • chunk 按指定成员数量分离数组
      • findIn 查询对象数组或二维数组是否存在相同的键
    • 过滤
      • dedupe 数组去重函数
      • difference 数组差集函数
      • intersection 数组交集函数
      • union 数组并集函数
    • 操作
      • remove 删除数组某项元素
      • shuffle 数组乱序函数
    • 验证
      • isAll 是否数组内所有成员符合条件
      • isAny 是否数组内部分成员符合条件
      • isArray 是否是数组
      • isEqual 是否数组内每一项均严格相等
  • Cookie
    • getCookie - 获取 Cookie 值
    • rmCookie - 移除 Cookie 值
    • setCookie - 设置 Cookie 值
  • Date
  • Debug
    • warning - 打印程序错误信息
  • Device
    • getBrowser 获取浏览器类型
    • getOS 获取操作系统类型
  • DOM
    • css - 获取和设置元素的 CSS 样式
    • cssTransform
    • html - 获取或设置一个 DOM 的 innerHtml
    • selector - DOM 元素选择器
    • val
    • getElementWidth - 获取元素宽度
  • Function
    • argToArray
    • isAllFunction
    • mixBindWithApply
  • Hash
    • guid - 随机生成 GUID 码
  • Math
    • accAdd - 加法运算
    • accDiv - 除法运算
    • accMul - 乘法运算
    • accSub - 减法运算
    • accValidation - 运算验证
    • convertToInt - 转化为整数
    • countDecimals - 计算数值小数点后位数
    • fixZero - 补零函数
    • formatDecimal - 格式化数值(金额数值)并可指定保留小数个数
    • formatDigit - 格式化数字(千位断点)
    • randomRange - 随机生成指定范围内整数
    • uppercaseMoney - 数字转为中文大写金额
  • Module
    • getModuleName - 根据路径获取依赖包名
  • Object
    • getPrototypeOf - 获取对象原型对象
    • getTypeOf - 获取数据类型
    • setPropertyOf - 设置对象属性
    • deepClone - 深拷贝
  • Regexp
  • Request
    • request - 网络请求
  • String
  • URL
    • queryParse - 将 URL 字符串转为 JavaScript 对象
  • Validation
    • isUndefined - 用于判断是否是 Undefined
    • isNull - 用于判断是否是 Null
    • isBlank - 用于判断是否为空
    • isNumber - 用于判断是否是 Number 类型
    • isBoolean - 用于判断是否为 Boolean 类型
    • isString - 用于判断是否是 String 类型
    • isArray - 用于判断是否为数组类型
    • isPlainObject - 用于判断是否为纯对象
    • isEmptyObject - 用于判读是否为空对象
    • isFunction - 用于判断是否为 Function 类型
    • isSymbol - 用于判断是否是 Symbol 类型
    • isHtmlElement - 用于判断是否为 HTMLElement 元素
    • isAlpha - 用于判断是否为单个字母字符串
    • isDecimal - 用于判断数值是否含有浮点数
    • isNegativeDecimal - 用于判断是否为负数值并且含有浮点数
    • isPositiveDecimal - 用于判断是否为正数值并且含有浮点数
    • isIdentityCodeValid - 用于判断身份证合法性

isBrowser