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

@qqt-vue/core

v0.4.3

Published

产品公共及核心方法

Readme

core

无框架依赖的核心层及工具层封装
下列说明中 export 内的方法名,均可 import { xx } from 'wl-core' 导入使用

store

均为静态方法,可直接调用。它包括有:
```js
setStore({name:'key', content:{data:1}, type:'session'})  // 存入本地存储 可以是 对象 数组 布尔 文本, type 参数 为 是否 session 存储
getStore({name:'key',timer:50}) // 获取保存的数据,可通过timer 设置有效期(分钟)
removeStore({name:'key'}) // 删除对应存储数据
getAllStore() // 获取全部localStorage
clearStore() // 清空全部localStorage

Array

提供有关数组的操作方法 Function

export {
  valInDeep, // 从树形数据中递归筛选目标值 function (arr = [], val, id = "Id", childs = "Children")
  flattenDeep, // 将树形数据向下递归为一维数组 function (arr = [], childs = "Children") 
  flattenDeepParents, // 将树形数据向上将此支线递归为一维数组 function (arr, parent)
  regDeepParents, // 根据条件递归祖先元素 function (row, parent, reg)
  arrayToTree, // function ( array = [], options = { id: "id", pid: "pid", children: "children" , rootPidVal})
  patchTreeChain, // 如果数据里缺少树枝节点,则根据parents和自增长id补全整条树链,输出数据调用上部arrToTree函数组装成完整的树 function patchTreeChain( data, sourceData, options = { Id: "Id", ParentId: "ParentId", Parents: "Parents", IdentityId: "IdentityId", root: "00000000-0000-0000-0000-000000000000" } )
  locationAfterDelete, // 数组删除后重新定位 function (data, delId, actId, useTree = false)
  splicParentsUntil, // 从坐标值拼接指定字段到祖先元素
  intersectionBy, // 根据数组2内的元素,通过match字段匹配数组1内的完整内容组成的数据
  deepClone, // 深拷贝
  getMax, // 筛选出数组中最大值
  getMin, // 筛选出数组中最小值
  autoPositionAfterDelete, // 重写的一维数组删除数据后自动定位
};

Event

提供对浏览器事件的封装 Function

export {
  throttle, // 节流函数
  debounce // 防抖函数
}

validate

数据验证

export {
  validateURL, // 是否合法url 参数 文本
  isEmail, // 邮箱地址验证
  isMobile, // 验证是否手机号码
  isPhone, // 验证电话号码
  isURL, // 验证URL
  isPositiveNumber, // 验证大于0
  validateNum, // 验证整数
  validateNumOrd, // 验证小数
  validateNumber, // 验证非负数
  validateLowerCase, // 验证小写
  validateUpperCase, // 验证大写
  validateAlphabets, // 验证大小写
  validateEmail, // 验证邮箱
  validateMobile, // 验证手机号
  validatePc, // 验证PAD 还是PC
  validateName, // 验证名字
  validateNull, // 验证是否为空
  isEmptyString, // 验证非空字符串
  cardId, // 判断身份证号码
  validate, // 整体表单验证
}

core

表单及表格配置化处理核心方法

export {
  checkFixDic, // 检查预设好的数据字典
  updateBizDic, // 更新业务字典数据
  getBizDictData, // 获取业务字典数据
  addRules, // 添加验证规则
  checkDataType, // 检查日期类型 进行录入组件预处理
  fixDataType, // 修复日期类型问题
  handlerSystemFiled, // 系统默认字段处理
  setCellStyle, // 设置单元格样式 , 需要注意性能问题
  filterColumn, // 过滤字段配置
  setDisplayName, // 显示名称设置使用
  setI18n, // 国际化名称设置使用
  setValidateNumber, // 设置大于0 的单元格规则
}