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

mictools

v1.1.0

Published

<h1 align="center"> <b> <a href="">mictools</a><br> </b> </h1> <p align="center">Provides enterprise tools</p> <p align="center"> <a href=""><b>Operation</b></a> • <a href=""><b>Documentation</b></a> </p>

Downloads

49

Readme

String

initialUppercaseRemaLowercase 首字母大写,其余字母小写

 initialUppercaseRemaLowercase('hello world')   =>  Hello world

getType 判断当前类型, 返回值为 Number -> String ->Boolean -> Undefined ->Null -> Object

 getType('hello world')   =>  String
 getType(Null)   =>  Null
 getType({})   =>  Object
 getType(undefined)   =>  Undefined
 getType([])   =>  Array

isString 判断是否是字符串

 isString('hello world')   =>   true

获取 对象、数组、字符串长度

 getLen('hello')   =>   5
 getLen({ name: 'test'})   =>   1
 getLen([])   =>   0

将字符串转成小写

convertToLowerCase('test')  =>  test

将字符串转成大写

convertToLowerCase('test')  =>  test

Object

判断当前对象是否为空

isEmptyObject({})  =>  true

将对象转成成字符串 url 地址

objectConvertToUrl({a:1,b:2})  => a=1&b=2

对象根据属性设置值

objectMappAssignment({a:1, b:2, c:{d: 4}}, 'c', 'test')  => {a:1, b:2, c: 'test'}

数组

查询数组中元素是否存在;或者查询到进行赋值

checkElementAssignment(
  [
    { id: 1, name: "323" },
    { id: 2, name: "ddfdfdf" },
  ],
  "id",
  1,
  {
    type: "query",
    newValue: {
      id: 33333,
      name: "lishi",
    },
  }
);   => type === 'query', 则返回 true/false;  => type ==='assignment',则进行赋值 =>
     [
        { id: 1, name: "323" },
        { id: 33333, name: "lishi" }
    ]

Route

动态获取浏览器路径参数值

getRouteParameters('a')  =>   'http://www.test.com?a=1&b=2'   =>    1

RegExp

校验邮箱格式是否正确

validatorEmail('test')  =>  false
validatorEmail('[email protected]')  =>  true

校验手机号格式是否正确

validatorPhone('test')  =>  false
validatorEmail('13515246129')  =>  true