mirror of
https://github.com/hanzoai/expr.git
synced 2026-09-24 16:58:58 +00:00
Add pipe docs
This commit is contained in:
@@ -110,6 +110,12 @@
|
||||
<code>[:]</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pipe</td>
|
||||
<td>
|
||||
<code>|</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Examples:
|
||||
@@ -168,6 +174,17 @@ array[3:] == [4, 5]
|
||||
array[:] == array
|
||||
```
|
||||
|
||||
### Pipe Operator
|
||||
|
||||
The pipe operator `|` can be used to pass the result of the left-hand side
|
||||
expression as the first argument of the right-hand side expression.
|
||||
|
||||
For example, expression `split(lower(user.Name), " ")` can be written as:
|
||||
|
||||
```expr
|
||||
user.Name | lower() | split(" ")
|
||||
```
|
||||
|
||||
## Built-in Functions
|
||||
|
||||
### all(array, predicate)
|
||||
|
||||
Reference in New Issue
Block a user