ember-let
ember-let copied to clipboard
consider aliasing if-let to with?
I don't feel super strongly about this but maybe it'd be nice for this library to also alias if-let
to with
? Rationale: with
is an unfortunate name whose falsy inverse behavior is unexpected, whereas if-let
speaks more to its semantics and putting it in this addon might be a nice way to collectively nudge folks away from with
.
I mean, I like it.
I like it too.
ok so let's add it. who knows how to alias stuff?
I would add an AST transform to rewrite with
to if-let
:
Links:
- http://jsbin.com/xurimeb/edit?html,js,output - Does the simplest thing that "works".
- https://github.com/thefrontside/ember-let/blob/master/lib/inline-let-transform.js - Example of one currently used for inline form
- https://github.com/thefrontside/ember-let/blob/master/index.js#L16-L22 - AST transform registration
with
takes a single argument where I would expect if-let
to take multiple...