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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@quackxl/utility

v0.0.4

Published

JS常用工具封装

Downloads

8

Readme

@quackxl/utility

封装了一些常用的js方法

主要是方便自己日常的代码编写

目前处于想到什么方法添加什么方法的缓慢完善进度中。。。

使用文档

使用文档

更新日志

更新日志

代码开源

Github

Gitee

Npm

已有方法(缓慢更新中)

  • checkColor 判断数据是否符合颜色格式规范
  • checkEmail 判断数据是否符合邮箱规范,支持带汉字的邮箱
  • checkHex 判断数据是否符合 hex 颜色格式规范
  • checkHsl 判断数据是否符合 hsl 颜色格式规范
  • checkHsla 判断数据是否符合 hsla 颜色格式规范
  • checkID 判断数据是否符合身份证号码规范,15 位或者 18 位
  • checkMobilePhone 判断数据是否符合移动电话号码规范
  • checkQQ 判断数据是否符合 QQ 号规范
  • checkRgb 判断数据是否符合 rgb 颜色格式规范
  • checkRgba 判断数据是否符合 rgba 颜色格式规范
  • checkTelephone 判断数据是否符合固定电话号码规范
  • dateFormat 时间格式化。根据传入的template格式将传入的dateTime时间转化为想要的时间字符串
  • getType 获取数据的类型
  • isArray 判断数据是否为 Array 类型
  • isBigInt 判断数据是否为 BigInt类型
  • isBoolean 判断数据是否为 Boolean类型
  • isNotEmpty 判断数据是否为非空类型,nullundefined''[]{}均返回false
  • isNull 判断数据是否为Null类型
  • isNumber 判断数据是否为Number类型
  • isObject 判断数据是否为Object类型,仅仅判断通过{}new Object()创建出来的对象
  • isString 判断数据是否为String类型
  • isSymbol 判断数据是否为Symbol类型
  • isUndefined 判断数据是否为Undefined类型
  • trimAll 去掉 str 中的全部类型空格,包括t\r\f\n\s