1
3dwelcome 2021 年 7 月 30 日
一般工具都是在 npm 上直接搜的。
前端开发模块粒度都比较细,用不上那种功能齐全的大类库。 |
2
statement 2021 年 7 月 30 日
Lodash 还不够知名吗?
|
3
CodeCodeStudy 2021 年 7 月 30 日
isArray 都成一个包了
|
4
zzx0403 2021 年 7 月 30 日
@CodeCodeStudy 为啥不用 Array.isArray
|
5
hakr OP |
6
CodeCodeStudy 2021 年 8 月 2 日
@zzx0403 #4
https://www.npmjs.com/package/isarray 上面写的是 isArray for older browsers and deprecated Node.js versions. 只有短短的几行代码 var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) === '[object Array]'; }; 我都吓呆了,就不能把所有的工具类的函数整成一个包吗,非得一个功能一个包? |
7
zzx0403 2021 年 8 月 3 日
@CodeCodeStudy 这是复制 mdn 上的 polyfill 吧哈哈哈
|