Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.72 KB

File metadata and controls

30 lines (26 loc) · 1.72 KB

rocket-utils

大部分时候可以选择使用 lodash, lodash 没有的就话就自己写吧。

name desc status
arrayToTree 数组转树 ✅
flatTreeToArray 树转数组 ✅
divideArray 数组分块 ✅
groupBy 数组按 key 分组 ✅
deRepeat 数据去重 ✅
diffForTwoArray 数组之间相减 ✅
intersectionForTwoArray 数组之间的交集 ✅
unionArray 数组之间的并集 ✅
validateMoney 娇艳是否为合法金额 ✅
toLocalAmount 金额千分位处理 ✅
genRandomNum 生成区间内的随机数 ✅
genRandomCodeList 生成不重复的随机码列表 ✅
formatStrToHump 装字符串下划线转驼峰 ✅
toHump 将 JSON 对象格式化为驼峰模式 ✅
visitPath 访问对象的属性路径 ✅
getUrlParam 获取 URL 中的指定参数 ✅
searchTree 树的搜索 todo

常用3方的工具库

name desc repo
dayjs 时间处理 -
url-parse url 参数解析 https://www.npmjs.com/package/url-parse