aboutsummaryrefslogtreecommitdiff
path: root/docs/io.md
diff options
context:
space:
mode:
authorame <[email protected]>2024-01-11 08:54:58 -0600
committerame <[email protected]>2024-01-11 08:54:58 -0600
commit9a8c7115e4a901f6df38ccaa5bf56f6d614a735f (patch)
tree79aa2321fde6944646df783d3fefe5a91094f826 /docs/io.md
parent54b05b7f5250b3c468aae62b4ee3cd0a8a669b81 (diff)
arg_handle
Diffstat (limited to 'docs/io.md')
-rw-r--r--docs/io.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/io.md b/docs/io.md
index dd5aff0..79b4b23 100644
--- a/docs/io.md
+++ b/docs/io.md
@@ -52,3 +52,31 @@ returns a table represented by the string
```lua
llib.io.json_parse('{"test":[5,4,3]}') -- {"test" : {5, 4, 3}}
```
+
+### arg_handle
+
+'accepts two tables
+ 1 = table mapped with names and function
+ 2 = args, or the list of strings to test
+
+the first table accepts this layout
+
+{ { list_of_keys, function_to_execute }, ... }
+
+returns nothing, executes marked functions
+
+```lua
+llib.io.arg_handle({
+ {
+ {"test"},
+ function()
+ print("test")
+ end,
+ }, {
+ {"test2","t"},
+ function()
+ print("test2")
+ end,
+ }
+}, arg)
+```