File: dot_notation.mustache

package info (click to toggle)
mustache.js 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,144 kB
  • sloc: javascript: 1,518; ruby: 61; sh: 17; makefile: 14
file content (12 lines) | stat: -rw-r--r-- 678 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
<!-- exciting part -->
<h1>{{name}}</h1>
<p>Authors: <ul>{{#authors}}<li>{{.}}</li>{{/authors}}</ul></p>
<p>Price: {{{price.currency.symbol}}}{{price.value}} {{#price.currency}}{{name}} <b>{{availability.text}}</b>{{/price.currency}}</p>
<p>VAT: {{{price.currency.symbol}}}{{#price}}{{vat}}{{/price}}</p>
<!-- boring part -->
<h2>Test truthy false values:</h2>
<p>Zero: {{truthy.zero}}</p>
<p>False: {{truthy.notTrue}}</p>
<p>length of string should be rendered: {{price.currency.name.length}}</p>
<p>length of string in a list should be rendered: {{#singletonList}}{{singletonItem.length}}{{/singletonList}}</p>
<p>length of an array should be rendered: {{authors.length}}</p>