-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconditions.js
31 lines (26 loc) · 939 Bytes
/
conditions.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
// Generated by CoffeeScript 1.8.0
/* (C) 2014 Narazaka : Licensed under The MIT License - http://narazaka.net/license/MIT?2014 */
var MiyoFilters;
if (typeof MiyoFilters === "undefined" || MiyoFilters === null) {
MiyoFilters = {};
}
MiyoFilters.conditions = {
type: 'data-value',
filter: function(argument, request, id, stash) {
var condition, _i, _len, _ref;
if ((argument != null ? argument.conditions : void 0) == null) {
return;
}
_ref = argument.conditions;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
condition = _ref[_i];
if ((!this.has_property(condition, 'when')) || this.property(condition, 'when', request, id, stash)) {
return this.call_entry(condition["do"], request, id, stash);
}
}
}
};
if ((typeof module !== "undefined" && module !== null) && (module.exports != null)) {
module.exports = MiyoFilters;
}
//# sourceMappingURL=conditions.js.map