Skip to content

Commit

Permalink
Merge branch 'documentation' of https://github.com/constellation-mc/c…
Browse files Browse the repository at this point in the history
…ommander into documentation
  • Loading branch information
melontini committed May 10, 2024
2 parents 930fc17 + 5f511fd commit 87adb4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ All functions construct new arrays and do not mutate the original array.
| Function | Description | Arguments | Example |
|---|---|---|---|
| `structContainsKey` | Checks if a struct contains some key. | `struct`, `key...` | `structContainsKey(block_state.properties, 'candles')` |
| `hasContext` | Checks if a expression parameter is available | `key...` | `hasContext('tool')` |
| `hasContext` | Checks if an expression parameter is available | `key...` | `hasContext('tool')` |
| `length` | Returns the length of the specified object or 0. | `value` | `length('Hello World!')` |
| `strFormat` | Formats a string according to the pattern. | `pattern`, `args...` | `strFormat('Hello %s World!', 23)` |
| `ifMatches` | Simillar to built-in `if`, but with Lambdas. | `value`, `predicate(λ)`, `ifTrue(λ)`, `ifFalse(λ)` | `ifMatches(arrayFind(arrayOf(0,1,2), it == 1), length(it) > 0, it[0], 0)` |
Expand Down Expand Up @@ -141,4 +141,4 @@ Using the provider in conditions:
"max": 32
}
}
```
```

0 comments on commit 87adb4b

Please sign in to comment.