File: complex.js

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 (19 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
({
  header: function () {
    return "Colors";
  },
  item: [
      {name: "red", current: true, url: "#Red"},
      {name: "green", current: false, url: "#Green"},
      {name: "blue", current: false, url: "#Blue"}
  ],
  link: function () {
    return this["current"] !== true;
  },
  list: function () {
    return this.item.length !== 0;
  },
  empty: function () {
    return this.item.length === 0;
  }
})