-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional helpers? #802
Comments
@NullVoxPopuli I think for the examples you give here, having #756 plus a fix to make method dispatch work as expected would solve nicely. You can import let someArray = [[1], [2]];
<template>
{{(someArray.flat)}}
</template> (In general, my own inclination is to have Ember focus on the things it specifically brings to the table, while letting lodash etc. handle general JS utility behavior.) |
I’m closing since there doesn’t seem to be a path forward. However, I will happily reopen if one is proposed! |
Using @chriskrycho's suggestion, |
Yep, what we need is to see if we can fix method handling so it works the way people expect it to. Namely: if you actually have a reference to an object and call a method on it, that should work, just like in JS. The spec group has talked about this a few times and come up with some possibly workable ideas but we need someone with the relevant knowledge to champion and drive forward that work. |
(To clarify, I don’t mean “someone from the community needs to volunteer,” though if someone does that’s awesome and we would try to help get them leveled up. But even on Framework the list of folks with expertise in the Glimmer syntax and semantics needed to drive this and time to work on it specifically is short at present. |
kind of gauging interest here, kinda inspired by this thread: https://twitter.com/x8BitRain/status/1498563445058584576
and with the future of ESM / you only ship what you import (along with the recently merged first-class-component templates RFC),
I think we could add a lot more quality-of-life helpers that don't end up impacting the folks that don't use those helpers.
Like, we could add, maybe for strict-mode only:
and not sure what else, because with the default helper manager RFC nearly implemented, we get a bunch more helpers for free, via:
though, not ideal to do it this way.. cause Array.prototype.flatten is long
hmmmmmmm
thoughts? ideas?
The text was updated successfully, but these errors were encountered: