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
All other object API functions support objects, arrays, and maps. I find it arbitrary that only the keys function does not support arrays. array.keys() is a thing; as well as Object.keys(array).
I agree that it might seem like a useless functionality, but I believe it's worth it for API consistency: all functions should work on all types of collections.
I, in fact, have a use for keys where I'd like not to worry about the type of the underlying collection (though I admit it is not a common use-case).
I'd be happy to provide a PR if you agree with my suggestion.
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.
lockbot
locked as resolved and limited conversation to collaborators
Jul 21, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
All other object API functions support objects, arrays, and maps. I find it arbitrary that only the
keys
function does not support arrays.array.keys()
is a thing; as well asObject.keys(array)
.I agree that it might seem like a useless functionality, but I believe it's worth it for API consistency: all functions should work on all types of collections.
I, in fact, have a use for
keys
where I'd like not to worry about the type of the underlying collection (though I admit it is not a common use-case).I'd be happy to provide a PR if you agree with my suggestion.
The text was updated successfully, but these errors were encountered: