jonschlinkert / kind-of

Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
https://github.com/jonschlnkert
MIT License
351 stars 40 forks source link

arguments try catch check is done very early #19

Closed aretecode closed 7 years ago

aretecode commented 7 years ago

@jonschlinkert suggestion here, these are all typeof object, why check isArguments, with tryCatch before the more common use cases?

https://github.com/jonschlinkert/kind-of/commit/5ecb91227957d0857362022b192f737db797cde3#diff-de1a5a7de991855714cdf433e9f8be96R23

jonschlinkert commented 7 years ago

benchmarks