addyosmani / addyosmani/mustache-for-chromeapps
Processing a value through a global helper (middleware)
オープン
- 主要言語
- JavaScript
- スター
- 28
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。