Skip to content

Commit 6282b72

Browse files
committed
Documentation
1 parent 43b76c4 commit 6282b72

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ By default, the value inserted for a token will be applied as the nodeValue of t
223223
| forin | `{{ forin:token }}` | Iterates over every property found in the assumed object. See the [object](/example/simple-javascript/object.html) example. |
224224
| boolean | `{{ boolean:token }}` | Inserts boolean per resolved truthiness of value (e.g. *checked="false"*, *disabled="true"*, *class="true"*). |
225225

226+
Modifiers can be applied on top of Transformers:
227+
```html
228+
<samp>The national debt is ${{ concat:toLocaleString:debt }}.</samp>
229+
```
226230
***
227231
### Transformers
228232
Transformers allow for modification of a value prior to insertion into the targeted location. This allows for performing logic on the data without embedding logic into the markup. The transformer function receive two arguments: the value and the index of the current iteration.
@@ -268,7 +272,7 @@ templater.getVersion(); // returns current version, e.g. "2.2.0"
268272
|-------------|-------------|-------------|
269273
| `init` | *none* | Returns an instance of the microdata-template. |
270274
| `render` | *element, data* | Populates the HTML element template with data. |
271-
| `clear` | *element, callback* | Removes dynamically populated content, retaining template. |
275+
| `clear` | *element, callback* | Removes dynamically populated content, retaining the original template. |
272276
| `refresh` | *element, data* | Makes current a previously rendered template. |
273277
| `setTransformer` | *name, func* | Provides for a custom transformer. |
274278
| `getTransformers` | *none* | Returns default and custom transformers. |

0 commit comments

Comments
 (0)