Skip to content

Commit a6028f0

Browse files
committed
chore: update standard script engine readme
1 parent 1314c4b commit a6028f0

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

script/standard/README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ The standard script engine is a basic implementation of the script.Engine interf
44

55
## Supported Operations
66

7-
|operator|name|supported types|
8-
|-|-|-|
9-
|`\|\|`|logical OR|boolean|
10-
|`&&`|logical AND|boolean|
11-
|`==`|equals|number\|string|
12-
|`!=`|not equals|number\|string|
13-
|`<=`|less than or equal to|number|
14-
|`>=`|greater than or equal to|number|
15-
|`<`|less than|number|
16-
|`>`|greater than|number|
17-
|`=~`|regex|string|
18-
|`+`|plus/addition|number|
19-
|`-`|minus/subtraction|number|
20-
|`**`|power|number|
21-
|`*`|multiplication|number|
22-
|`/`|division|number|
23-
|`%`|modulus|integer|
7+
|operator|name|supported types|description|
8+
|-|-|-|-|
9+
|`\|\|`|logical OR|boolean|return true if left-side OR right-side are true|
10+
|`&&`|logical AND|boolean|return true if left-side AND right-side are true|
11+
|`!`|not|boolean|return true if right-side is false. The is no left-side argument|
12+
|`==`|equals|number\|string|return true if left-side and right-side arguments are equal|
13+
|`!=`|not equals|number\|string|return true if left-side and right-side arguments are not equal|
14+
|`<=`|less than or equal to|number|return true if left-side number is less than or equal to the right-side number|
15+
|`>=`|greater than or equal to|number|return true if left-side number is greater than or equal to the right-side number|
16+
|`<`|less than|number|return true if left-side number is less than the right-side number|
17+
|`>`|greater than|number|return true if left-side number is greater than the right-side number|
18+
|`=~`|regex|string|perform a regex match on the left-side value using the right-side pattern|
19+
|`+`|plus/addition|number|return the left-side number added to the right-side number|
20+
|`-`|minus/subtraction|number|return the left-side number minus the right-side number|
21+
|`**`|power|number|return the left-side number increased to the power of the right-side number|
22+
|`*`|multiplication|number|return the left-side number multiplied by the right-side number|
23+
|`/`|division|number|return the left-side number divided by the right-side number|
24+
|`%`|modulus|integer|return the remainder of the left-side number divided by the right-side number|
25+
26+
All operators have a left-side and right-side argument, expect the not `!` operator which only as a right-side argument. The arguments can be strings, numbers, boolean values, arrays, objects, a special parameter, or other expressions, for example `true && true || false` includes the logical AND operator with left-side `true` and right-side a logical OR operator with left-side `true` and right-side `false`.
2427

2528
### Regex
2629

0 commit comments

Comments
 (0)