Skip to content

Commit f70e95a

Browse files
committed
docs: document TOON format helpers and template helper
- Add documentation for from_toon and to_toon helpers in FILTERS.md - Add documentation for template helper in TEMPLATE.md These changes improve documentation coverage for new helper functions and template features.
1 parent 6f7caba commit f70e95a

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/docs/FILTERS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Using the same unix “pipe” mechanism it’s possible to apply different cate
9393
| from_slon(obj) | 20240215 | Converts a slon string representation into an object | from_slon('(abc: 123)') |
9494
| from_timeAbbr(x) | 20240209 | Converts a time abbreviation into ms | from_timeAbbr('12s') |
9595
| from_toml(str) | 20240502 | Given a TOML format string tries to convert it to an object | from_toml(@) |
96+
| from_toon(str) | 20260116 | Given a TOON format string tries to convert it to an object | from_toon(@) |
9697
| from_xml(str) | 20251115 | Given an XML format string tries to convert it to an object | from_xml(@) |
9798
| from_yaml(str) | 20240215 | Converts a YAML string representation into an object | from_yaml(@) |
9899
| get(nameOrPath) | 20240305 | Given a path to the original object or a name set by 'set' or 'setp' returns the corresponding value | packages[].{name: name, version: version, parentVersion: get('version') } |
@@ -180,6 +181,7 @@ Using the same unix “pipe” mechanism it’s possible to apply different cate
180181
| to_slon(obj) | 20240215 | Given an object will return the SLON representation of it. | to_slon(@) |
181182
| to_string(any) | base | Transforms any input into a string | to_string(`123`) |
182183
| to_toml(obj) | 20240502 | Given an object outputs a TOML format string if possible | to_toml(@) |
184+
| to_toon(obj) | 20260116 | Given an object will return the TOON representation of it. | to_toon(@) |
183185
| to_xml(obj) | 20251115 | Given an object will return the XML representation of it. | to_xml(@) |
184186
| to_yaml(obj, inline) | 20240215 | Given an object will return the YAML representation of it with optional inline boolean flag | to_yaml(@, `true`) |
185187
| trim(str) | 20240209 | Given a string will return a trimmed version of it | trim(@) |

src/docs/TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Here are some of the available helpers:
3333
| $pbar | shows an ansi ascii progress bar with a value and a max value, a min value, a size, an indicator and space char |
3434
| $pbars | shows an ansi ascii tree of progress bars with a format string: "unit path:color:legend... [-min:0] [-max:100] [-hsize:40]"|
3535
| $ptable | shows an ansi ascii printTable representation of an object |
36+
| $mdtable | shows a markdown table given an array of headers and an array of rows (objects, arrays, or scalars) |
3637
| $ptree | shows an ansi ascii printTree representation of an object |
3738
| $pchart | shows an ansi ascii line chart with an object and a format string: "unit path:color:legend... [-min:0] [-max:100] [-hsize:40] [-vsize:10]" |
3839
| $output | shows an $output representation of an object (aObj as 1st arg and options in slon as 2nd arg) |

0 commit comments

Comments
 (0)