Implement group command + fallback error handling for invalid tables in output
This commit is contained in:
13
HELP.md
13
HELP.md
@@ -272,16 +272,21 @@ Destructure the current subject based on the given delimiter.
|
||||
If a `limit` is provided, split the subject no more than the given number of times.
|
||||
Example: `foo::bar::baz::ban` -> `split :: 2` -> `[foo, bar, baz::ban]`
|
||||
|
||||
#### `chunk <every> <line|word|char>`
|
||||
Destructure the current subject into chunks based on `every` Nth line/word/character.
|
||||
Example: `a b c d e f` -> `chunk 2 word` -> `[a b, c d, e f]`
|
||||
|
||||
#### `join [<on>]`
|
||||
Join the current destructured subject back together using the given delimiter.
|
||||
If no delimiter is provided, it will preserve the existing delimiters between substrings.
|
||||
If string is not destructured, joins the lines in the string.
|
||||
Example: `[foo, bar]` -> `join ::` -> `foo::bar`
|
||||
|
||||
#### `chunk <every> <line|word|char>`
|
||||
Destructure the current subject into chunks based on `every` Nth line/word/character.
|
||||
Example: `a b c d e f` -> `chunk 2 word` -> `[a b, c d, e f]`
|
||||
|
||||
#### `group <callable>`
|
||||
Group the current destructured subject based on some mapped value.
|
||||
The `callable` is called for each destructured part and parts are bucketed together by the output value.
|
||||
Example: `[aa, ab, ba, bb]` -> `group (rsub 1)` => `[[aa, ab], [ba, bb]]`
|
||||
|
||||
#### `sort [<asc|desc>]`
|
||||
Sort the items in the destructured subject alphabetically either `asc`ending (default) or `desc`ending.
|
||||
If string is not destructured, sorts the lines in the string.
|
||||
|
||||
Reference in New Issue
Block a user