summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
685ffcf)
Extend the "compared" Handlebars helper to implement a "matches"
operator for regular-expression matching.
'>': function (l, r) { return l > r; },
'<=': function (l, r) { return l <= r; },
'>=': function (l, r) { return l >= r; },
'>': function (l, r) { return l > r; },
'<=': function (l, r) { return l <= r; },
'>=': function (l, r) { return l >= r; },
- 'typeof': function (l, r) { return typeof l == r; }
+ 'typeof': function (l, r) { return typeof l == r; },
+ 'matches': function (l, r) { return l.match(r); }
};
if (!operators[operator]) {
};
if (!operators[operator]) {