ember-cli-string-helpers icon indicating copy to clipboard operation
ember-cli-string-helpers copied to clipboard

Feature Request: fmt

Open viniciussbs opened this issue 5 years ago • 0 comments

Hi!

Once in a while I need to do string concatatenation in templates. concat helper works, but it is not as legible as string literals.

{{concat "var(" @varName ", " @defaulValue ")"}}

Something like the old Ember.String.fmt would be more legible:

{{fmt "var(%@1,  %@2)", @cssVar @defaultValue}}

There is an implementation of this function in @GavinJoyce's ember-string-fmt that could be used. I don't know if his repo is a better place for this helper. What do you think?

viniciussbs avatar Sep 01 '20 12:09 viniciussbs