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

hanweb_utils

v1.0.11

Published

前端方法工具包

Downloads

23

Readme

项目说明

作者:无
目录结构描述
hanweb_utils
|—— source          //资源文件存放位置
|-- readme          //依赖包使用说明
|-- package.json    //项目配置文件
|-- updateDesc      //版本更新说明
环境描述
vue 2-3版本
下载安装
npm install hanweb_utils

方法使用说明

获取地址参数 GetRequest()
- 描述:获取url中"?"符后的字串
- 注意:该方法不支持参数包含json串/参数不可含有 “/” 符号   
信息脱敏 tuominHandler(str)
- 参数1:传入需要脱敏的数据
- 注意:目前只支持(姓名,身份证,手机号)   
信息校验 regCheckHandler(str,type)
- 参数1:传入需要校验的数据 str
- 参数2:type
1. sfz        身份证
2. mobile     手机号
3. hz         护照
4. txz        通行证
5. xxdm       统一信用代码  
毫秒数日期转换 getDateHandler(time)
- 描述:返回的格式:2022年06月01日     
材料下载 downloadFileByBase64(data)
- 描述:PC端下载文件
- 参数:data  类型:Object
1. url    下载文件的网络地址
2. name   下载文件的文件名
3. type   下载文件的类型(img:图片类型,pdf:pdf文件)  
图片下载 savePicture(url)
- 描述:PC端base64图片下载
- 参数 图片的base64编码    
导出excel表格 getExcelHandler(data)
- 安装依赖
1. npm install file-saver --save
2. npm install xlsx --save
3. npm install script-loader --save-dev
- 参数:data  类型:Object
1. tHeader      列名称
2. filterVal    列对应的key
3. list         需要导出excel表格的数据
4. name         导出表格的名称      
富文本解析 HTMLDecodeHandler(text)
描述:解析富文本(适用于不确定是否返回富文本数据)
参数:text 需要解析的富文本数据
数组对象排序 objectSortHandler(property, rule)
描述:数组对象排序   调用方法:list.sort(objectSortHandler('age'))
参数:
    1.property 用来排序的key(需要根据排序的对象key)
    2.rule  排序规则(默认从大到小,传参不为descend则从小到大)