aboutsummaryrefslogtreecommitdiff
path: root/docs/io.md
diff options
context:
space:
mode:
authorame <[email protected]>2023-12-19 11:38:17 -0600
committerame <[email protected]>2023-12-19 11:38:17 -0600
commit0112e2609f8aceb791656d19db568d04c586d7be (patch)
treeb130d479b882b903da691164f82557163c7dc048 /docs/io.md
parent9a4d5574a89c4a7842211238d8b9b30b905cc056 (diff)
some docs:3
Diffstat (limited to 'docs/io.md')
-rw-r--r--docs/io.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/io.md b/docs/io.md
new file mode 100644
index 0000000..d009c8d
--- /dev/null
+++ b/docs/io.md
@@ -0,0 +1,43 @@
+# io
+
+## common
+
+### pprint
+
+'accepts (probably) anything
+
+formats input as a readable string
+
+```lua
+llib.io.pprint({a = 5, b = {9, 9, 22}})
+```
+
+#### config options
+
+- print_type (0) - whether or not to print item type (0 or 1)
+- max_depth (2) - maximum depth that will not be collapsed
+- start_nl_at (3) - maximum depth that will be kept in-line
+
+### error/warn/log/debug
+
+'accepts a string
+
+outputs a fancy string (color!!!!)
+
+```lua
+llib.io.log("meow")
+```
+
+### readfile
+
+'accepts a file path
+
+returns the content of that file as a string
+
+```lua
+llib.io.readfile("./docs/io.md") -- (this file)
+```
+#### config options
+
+- file_chunksize (512) - size of chunk to be allocated
+