addyosmani / addyosmani/mustache-for-chromeapps
Processing a value through a global helper (middleware)
Abierto
- Lenguaje dominante
- JavaScript
- Estrellas
- 28
- Forks
- 8
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
In the examples a funciton that is run on a view (or model) is usually its method. Would it be possible to implement a syntax which would allow to let a model property through a global function - like a helper, say: a function to format amount as currency.
So that if we have a model:
```
{
name: Lexus,
price: 81999,
}
```
we would run the price through a helper named `amountToCurrency(amount, format)` using a syntax along `{{ ^amountToCurrency(amount, '$0.00') }}`.
Is that feasible?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.