mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 00:02:18 +00:00
3.3 KiB
3.3 KiB
| 1 | expression (string);input (json 5);output (json 5) | ||
|---|---|---|---|
| 2 | # Boolean | ||
| 3 | # Number | ||
| 4 | > 5;{$: 10};true | ||
| 5 | < 10;{$: 5};true | ||
| 6 | >= 10;{$: 10};true | ||
| 7 | <= 5;{$: 5};true | ||
| 8 | [-10..0];{$: 0};true | ||
| 9 | (-10..0];{$: -10};false | ||
| 10 | [-10..0);{$: -10};true | ||
| 11 | (-10..0);{$: 0};false | ||
| 12 | [-15..-5];{$: -4.99};false | ||
| 13 | [-5..5];{$: 5};true | ||
| 14 | [-6..6];{$: 5};true | ||
| 15 | [-5..5];{$: 5};true | ||
| 16 | [0..0];{$: 5};false | ||
| 17 | > 5 and < 10;{$: 5};false | ||
| 18 | <= 10 and > 5;{$: 10};true | ||
| 19 | >= 10 or < 5;{$: 10};true | ||
| 20 | <= 5 or >= 10;{$: 10};true | ||
| 21 | [-10..0] and > -5;{$: -5};false | ||
| 22 | [-10..0] and > -5;{$: -4.99};true | ||
| 23 | (-10..0] or > 0;{$: -10};false | ||
| 24 | [-10..0) and > -5;{$: -5};false | ||
| 25 | (-10..0) or > 0;{$: 5};true | ||
| 26 | [-15..-5] and <= -10;{$: -10};true | ||
| 27 | [-5..5] or > 0;{$: 5};true | ||
| 28 | [-5..5] or < 0;{$: 5.01};false | ||
| 29 | [-5..5] and > 0;{$: 5};true | ||
| 30 | [0..0] and < 5;{$: 0};true | ||
| 31 | > 10 or < -5;{$: 5};false | ||
| 32 | > 10 | < -5;{$: 15};true | |
| 33 | <= -10 and >= -15;{$: -5};false | ||
| 34 | # Numeric expressions | ||
| 35 | # More complex scenarios | ||
| 36 | # String expressions | ||
| 37 | 'GB' | 'US';{$: 'US'};true | |
| 38 | 'GB' | 'US';{$: 'FR'};false | |
| 39 | # Template string | ||
| 40 | `sum of numbers ${sum([1 | 2 | 3])}`;{ $: 'sum of numbers 6' };true |
| 41 | `reference env: ${a}`;{ $: 'reference env: example' | a:'example'};true | |
| 42 | `uppercase inner ${upper('string')}`;{$: 'uppercase inner STRING'};true | ||
| 43 | # String Slice | ||
| 44 | # Type conversion |