-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdust.js
35 lines (32 loc) · 811 Bytes
/
dust.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{references/}
{#section/}
{?exists/}
{^not_exists/}
{@helper/}
{! Comments !}
context-helpers or handlers
using the logic in the context rather than using in template itself
dustjs-helpers
{@eq}: strictly equal to
{@ne}: not strictly equal to
{@gt}: greater than
{@lt}: less than
{@gte}: greater than or equal to
{@lte}: less than or equal to
{<inline_partial/}
{>partial/}
{~special}
{~s} becomes a single space
{~n} becomes a new line
{~r} becomes a carriage return
{~lb} becomes a left curly brace {
{~rb} becomes a right curly brace }
{filters|s}
h – HTML-encode
s – turn off automatic HTML encoding
j – Javascript string encode
u – encodeURI
uc – encodeURIComponent
js – JSON.stringify
jp – JSON.parse
{@contextDump/} - to print the context for debugging