addyosmani / addyosmani/mustache-for-chromeapps

Processing a value through a global helper (middleware)

オープン
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。