1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function ifCond(v1, operator, v2, options) {
|
4 | switch (operator) {
|
5 | case '==':
|
6 | return (v1 == v2) ? options.fn(this) : options.inverse(this);
|
7 | case '===':
|
8 | return (v1 === v2) ? options.fn(this) : options.inverse(this);
|
9 | case '<':
|
10 | return (v1 < v2) ? options.fn(this) : options.inverse(this);
|
11 | case '<=':
|
12 | return (v1 <= v2) ? options.fn(this) : options.inverse(this);
|
13 | case '>':
|
14 | return (v1 > v2) ? options.fn(this) : options.inverse(this);
|
15 | case '>=':
|
16 | return (v1 >= v2) ? options.fn(this) : options.inverse(this);
|
17 | case '&&':
|
18 | return (v1 && v2) ? options.fn(this) : options.inverse(this);
|
19 | case '||':
|
20 | return (v1 || v2) ? options.fn(this) : options.inverse(this);
|
21 | default:
|
22 | return options.inverse(this);
|
23 | }
|
24 | }
|
25 | exports.ifCond = ifCond;
|
26 |
|
\ | No newline at end of file |