You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
It would remove the need for the hasOwnProperty check so it seems like it could only be faster, but it would have less browser support. I'm not sure what browsers we try to support?
Or maybe if it ain't broke don't fix it?
The text was updated successfully, but these errors were encountered:
Right now, it appears the library was written with deliberate ES3 support (for instance, using exports["new"] instead of exports.new), so Object.keys would be a no-go. I'm also not sure Object.keys would be faster than for-in, so you should use jsperf to test it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are several places we iterate over keys, and we're using the for/in method with hasOwnProperty. This is correct, but might it be better to use the .keys() method (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)?
It would remove the need for the hasOwnProperty check so it seems like it could only be faster, but it would have less browser support. I'm not sure what browsers we try to support?
Or maybe if it ain't broke don't fix it?
The text was updated successfully, but these errors were encountered: