@Bob
I'm sorry to hear that has been the response here thus far. I'm encouraged,
though, to hear there are others like you who see the value in this native
ability. I think those are great points about defaults and renaming. The
util approach may or may not be able to implement those effectively.
@Mikkel,
My impression is that one can summarize the attitude of people on this
mailing list and those involved in the language design process toward
property picking as somewhere between "I don't care enough to worry about
it" and "it doesn't belong in the language". To put it a different way,
Thank you, TJ. Those are some other interesting options. But undesirable,
like you say, least of which because they all require repetition like my
snippet in my original post. At least the array of properties avoids the
repetition. I agree it's not ideal because of the extra quote marks, but my
On Wed, Jul 25, 2018 at 10:45 PM, Mikkel Davis
wrote:
> I've seen proposals for syntax additions that give functionality
> similar to lodash's "pick" utility. But I think it may be more
> appropriate to add it as an Object utility in the same vein of
What I don't like about it being a utility
Unsure if this is even still being actively weekend out, but I've played
around with the binding operator in Babel for this purpose. It definitely
has its use case; mine was filtering allowed keys for a REST API.
On Wed, Jul 25, 2018, 19:54 Mikkel Davis wrote:
> Thanks for the heads up! As I
Thanks for the heads up! As I mentioned above, I've seen it come up before,
but all the top results when searching are syntactic proposals. Syntax
would be cool and all, but like you said it may or may not be justified. In
the mean time, I don't see any traction for an Object util proposal like
Just as a heads up, this has come up plenty of times before, both as a
function and (usually) syntax:
https://www.google.com/search?q=site%3Aesdiscuss.org+pick
I'm good with it being a built-in function, but it's harder to justify
using syntax apart from an easier time building up the relevant
I've seen proposals for syntax additions that give functionality similar to
lodash's "pick" utility. But I think it may be more appropriate to add it
as an Object utility in the same vein of `Object.assign`, `Object.keys`,
`Object.values`. After a quick search, I was surprised to not find an
8 matches
Mail list logo