4 ms·
Actually I did read the function, and I thought about the cycles that toString.call(arr) == '[object Array]' costs.
by gonzo41 6y ago
Actually I did read the function, and I thought about the cycles that toString.call(arr) == '[object Array]' costs.
- hn_throwaway_99 6y agoIs there some other implementation you think would work?
- seattle_spring 6y ago... which only gets called if the native implementation of `isArray` is not found.
- karmakaze 6y agoES5 is a low requirement. I'd rather use a lib that did a better job than one that returns true for the string '[object Array]' or have the app decide for itself what its own types are.