Skip to content

Commit 73abdbc

Browse files
committed
📝 Update builtin_functions.md
1 parent 3009761 commit 73abdbc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/books/src/reference/builtin_functions.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Builtin functions
2-
| Function Name | Description | Parameters | Example |
3-
| --- | --- | --- | --- |
2+
|Function Name|Description|Parameters|Example|
3+
|---|---|---|---|
44
|`abs`|Returns the absolute value of the given number.|`number`|abs(number)|
55
|`add`|Adds two values.|`value1`, `value2`|add(value1, value2)|
66
|`and`|Performs a logical AND operation on two boolean values.|`value1`, `value2`|and(value1, value2)|
@@ -15,7 +15,8 @@
1515
|`compact`|Removes None values from the given array.|`array`|compact(array)|
1616
|`contains`| Checks if string contains a substring|`haystack`, `needle`|contains(haystack, needle)|
1717
|`csv2table`| Convert csv string to markdown table|`csv`|csv2table(csv)|
18-
|`debug`|Prints the debug information of the given value.|`value`|debug(value)|
18+
|`csv2table_row`| Convert csv string to markdown table row|`row`|csv2table_row(row)|
19+
|`debug`| Prints the debug information of the given value.|`msg`|debug(msg)|
1920
|`del`|Deletes the element at the specified index in the array or string.|`array_or_string`, `index`|del(array_or_string, index)|
2021
|`div`|Divides the first value by the second value.|`value1`, `value2`|div(value1, value2)|
2122
|`downcase`|Converts the given string to lowercase.|`input`|downcase(input)|
@@ -25,6 +26,7 @@
2526
|`explode`|Splits the given string into an array of characters.|`string`|explode(string)|
2627
|`filter`| Filters the elements of an array based on a provided callback function.|`v`, `f`|filter(v, f)|
2728
|`first`| Returns the first element of an array|`arr`|first(arr)|
29+
|`flatten`|Flattens a nested array into a single level array.|`array`|flatten(array)|
2830
|`floor`|Rounds the given number down to the nearest integer.|`number`|floor(number)|
2931
|`from_date`|Converts a date string to a timestamp.|`date_str`|from_date(date_str)|
3032
|`get_md_list_level`|Returns the indent level of a markdown list node.|`list`|get_md_list_level(list)|
@@ -101,6 +103,7 @@
101103
|`sort`|Sorts the elements of the given array.|`array`|sort(array)|
102104
|`split`|Splits the given string by the specified separator.|`string`, `separator`|split(string, separator)|
103105
|`starts_with`|Checks if the given string starts with the specified substring.|`string`, `substring`|starts_with(string, substring)|
106+
|`stderr`|Prints a message to standard error and returns the current value.|`message`|stderr(message)|
104107
|`sub`|Subtracts the second value from the first value.|`value1`, `value2`|sub(value1, value2)|
105108
|`test`| Tests if string matches a pattern|`s`, `pattern`|test(s, pattern)|
106109
|`to_array`| Converts input to an array|`a`|to_array(a)|
@@ -129,6 +132,7 @@
129132
|`trim`|Trims whitespace from both ends of the given string.|`input`|trim(input)|
130133
|`trunc`|Truncates the given number to an integer by removing the fractional part.|`number`|trunc(number)|
131134
|`tsv2table`| Convert tsv string to markdown table|`tsv`|tsv2table(tsv)|
135+
|`tsv2table_row`| Convert tsv string to markdown table row|`row`|tsv2table_row(row)|
132136
|`type`|Returns the type of the given value.|`value`|type(value)|
133137
|`uniq`|Removes duplicate elements from the given array.|`array`|uniq(array)|
134138
|`upcase`|Converts the given string to uppercase.|`input`|upcase(input)|

0 commit comments

Comments
 (0)