This benchmark compares the performance of lodash's `has` function with native JavaScript code for checking if an object has a specific property. The lodash `has` function checks if `path` is a direct property of `object`. The native JavaScript code uses the `in` operator to check if an object has a specific property.
Comparing performance of: lodash.has vs Native JavaScript
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
lodash.has
Native JavaScript
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15