File: complex.js

package info (click to toggle)
mustache.js 0.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 684 kB
  • ctags: 95
  • sloc: ruby: 222; makefile: 11
file content (19 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var complex = {
  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;
  }
};