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

xinyin_library

v1.0.22

Published

新印科技公共library

Readme

新印科技类库

安装

npm install xinyin_library -S

方法列表

  1. setStorage(key,val) 本地存储
  2. getStorage(key) 获取本地存储
  3. removeStorage(key)
  4. clearStorage() 清除本地存储
  5. setDateStorage(key,val,date) 本地存储时限,date为时间戳
  6. getDateStorage(key) 获取定时本地存储
  7. setSession(key,val) 会话存储
  8. getSession(key)
  9. removeSession(key)
  10. clearSession()
  11. parseDate(date,format) 日期转换 date:时间戳|时间字符串 format:{y}-{m}-{d} {h}:{i}:{s}
  12. formatTime(date,format) 时间差 date:时间戳 format:{y}-{m}-{d} {h}:{i}:{s}
  13. getStartDayOfWeek(date) 获取本周开始时间 date:Date对象
  14. getEndDayOfWeek(date) 获取本周结束时间 date:Date对象
  15. getStartDayOfMonth(date) 获取本月开始时间 date:Date对象
  16. getEndDayOfMonth(Date) 获取本月结束时间 date:Date对象
  17. getMonthDays(Date) 获取本月天数 date:Date对象
  18. param2Obj(url) url参数转成对象 url:url字符串
  19. deepClone(obj) 深度复制对象 obj:{}|[]
  20. handleOptions(val, options) 根据value值返回label值 val:value值 options:下拉选项列表
  21. colorRgb(color, opy) color:16进制颜色值 opy:透明度
  22. hasClass(ele,class) ele:dom对象 class:class类
  23. addClass(ele,class) ele:dom对象 class:class类
  24. removeClass(ele,class) ele:dom对象 class:class类
  25. equalsObj(obj1,obj2) 深度比较两个对象是否相同 obj1:object|array对象 obj2:object|array对象
  26. isExternal(path) 是否是外部路由 path:路由地址
  27. verilyEmail(email) 邮箱格式验证
  28. verilyMobile(mobile) 手机号格式验证
  29. verilyName(name) 中文名验证
  30. verilyIDNo(idNo) 身份证号验证
  31. verilyMoney(money) 金额验证
  32. isEmpty(obj) 非空验证,为空返回true
  33. objToStr(obj) 对象转成url参数
  34. getQuery(url) 获取url参数转成对象