adopted-ember-addons / adopted-ember-addons/ember-cli-string-helpers

Feature Request: fmt

Abierto
#264 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
74
Forks
27
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

```hbs
{{concat "var(" @varName ", " @defaulValue ")"}}
```
Something like the [old `Ember.String.fmt`](https://deprecations.emberjs.com/v2.x#toc_ember-string-fmt) would be more legible:

```hbs
{{fmt "var(%@1, %@2)", @cssVar @defaultValue}}
```
There is an implementation of this function in @GavinJoyce's [ember-string-fmt](https://github.com/GavinJoyce/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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.