From 78d83c1c4ae765636584616b99ccf146636669cf Mon Sep 17 00:00:00 2001 From: ame Date: Thu, 11 Jan 2024 08:54:58 -0600 Subject: arg_handle --- docs/io.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'docs/io.md') 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) +``` -- cgit v1.2.3