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
347 stars 38 forks source link

arguments try catch check is done very early #19

Closed aretecode closed 6 years ago

aretecode commented 6 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 6 years ago

benchmarks