/scalate-util/src/test/resources/moustache/js/complex.js
http://github.com/scalate/scalate · JavaScript · 19 lines · 19 code · 0 blank · 0 comment · 0 complexity · 8ae46d717e3038e751ac7127ce084184 MD5 · raw file
- 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;
- }
- };