Skip to content

Repository files navigation

rocket-utils

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

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

常用3方的工具库

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

About

[M] 常用工具函数

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages