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

cxy_func

v1.0.1

Published

平常使用的工具类

Downloads

10

Readme

cyc_func

开始使用
import func from "cxy_func";
function init() {
  func.xxxfunction()
}
内置工具方法介绍
  1. SQLFieldAutoUpdate SQL自动转换update结构
  2. SQLFieldAutoInsert SQL自动转换insert结构
  3. SQLFieldAutoSaveUpdate SQL字段转insert与update结构
  4. Array2SQLInField 数组数据转成SQL的in字段
  5. arryTwodifference 判断两个数组的元素是否一致,不一致则返回元素,一致返回null
  6. separateNumber 分隔字符串,按位数分隔
  7. fileSizeToName 将file的大小转成KB/MB
  8. versionCompare 版本号比较方法
  9. fileNameSuffix 获取文件后缀名
  10. splitlen2 按位数分割,默认2位
  11. objCopy 对象copy(属性)
  12. deepClone 对象copy(可拷贝方法))
  13. isPhone 判断是否是手机号
  14. isPassword 6位数字密码验证
  15. isIdentity 身份证号验证
  16. isNumber 数字验证
  17. isNormal 特殊字符校验
  18. sleep 系统睡眠
  19. phone2Pwd 电话处理
  20. arry2objbylist 将数组转换成key对应值obj
  21. activeElement input是否获取焦点
  22. activeInput 输入框聚焦
  23. obj2GetData 对象转get请求数据
  24. extractHTMLContent html内容提取
  25. objDedupe 对象数组去重
  26. continuousInput 连续输入优化
  27. toMoney 转金额
  28. toFixed 小数点舍值默认2位
  29. random 随机数生成数据
  30. intervalRandom 区间随机数生成数据
  31. parse JSON.parse
  32. queryArray 数组内查询
  33. arrayToTree 数组格式转树状结构
  34. isExistent 判断是否存在
  35. isObjExistent 对象多值判断
  36. isArray 是否是数组
  37. isPicture 是否是图片格式
  38. removeSpace 去除空格
  39. indexOf arguments[0]值是否在arguments[1]字符串里面,全匹配!
  40. html_encode 内容转义html
  41. checksum 求和校验
  42. randomId 生成6位长度的id