From 802734b0048b557f4f7be424c43b064259bafa0b Mon Sep 17 00:00:00 2001 From: haithium <128622475+haithium@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:06:14 +0000 Subject: [PATCH] chore(docs): auto-generate docs --- docs/src/modules/fs.md | 16 +++++++++------- docs/src/modules/list.md | 4 ++-- docs/src/modules/tbl.md | 6 +++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/src/modules/fs.md b/docs/src/modules/fs.md index e5cd6c0..c33ed99 100644 --- a/docs/src/modules/fs.md +++ b/docs/src/modules/fs.md @@ -113,14 +113,15 @@ Iterator over items in `path`. **Parameters**: - `path` (`string`): Input path. -- `opts?` (`{hidden?:boolean,`): recursive?:boolean, follow_links?:boolean, - type?:string} Optional traversal options. +- `opts?` + (`{hidden?:boolean, recursive?:boolean, follow_links?:boolean, type?:string}`): + Optional traversal options. **Return**: -- `prev?:string):basename:string?,` (`(fun(state:table,`): - type:"file"|"directory"|"link"|"fifo"|"socket"|"char"|"block"|"unknown"?)? - iterator Iterator, or `nil` on failure. +- `iterator` + (`(fun(state:table, prev?:string):basename:string?, type:"file"|"directory"|"link"|"fifo"|"socket"|"char"|"block"|"unknown"?)?`): + Iterator, or `nil` on failure. - `state` (`table|string`): Iterator state on success, or error message on failure. @@ -141,8 +142,9 @@ Return direct children of a directory. **Parameters**: - `path` (`string`): Input path. -- `opts?` (`{hidden?:boolean,`): recursive?:boolean, follow_links?:boolean, - type?:string} Optional traversal options. +- `opts?` + (`{hidden?:boolean, recursive?:boolean, follow_links?:boolean, type?:string}`): + Optional traversal options. **Return**: diff --git a/docs/src/modules/list.md b/docs/src/modules/list.md index 3ef666d..3b30c4a 100644 --- a/docs/src/modules/list.md +++ b/docs/src/modules/list.md @@ -472,7 +472,7 @@ Sort the list in place. **Parameters**: -- `comp?` (`fun(a:any,`): b:any):boolean Optional comparison function (defaults +- `comp?` (`fun(a:any, b:any):boolean`): Optional comparison function (defaults to `nil`). **Return**: @@ -969,7 +969,7 @@ Reduce the list to a single value using an accumulator. **Parameters**: -- `fn` (`fun(acc:any,`): v:any):any Reducer function. +- `fn` (`fun(acc:any, v:any):any`): Reducer function. - `init?` (`any`): Optional initial accumulator; for non-empty lists, `nil` or omitted uses the first item. diff --git a/docs/src/modules/tbl.md b/docs/src/modules/tbl.md index 432fc0a..4db7bbe 100644 --- a/docs/src/modules/tbl.md +++ b/docs/src/modules/tbl.md @@ -364,7 +364,7 @@ Return a new table by mapping each key-value pair. **Parameters**: - `t` (`table`): Input table. -- `fn` (`fun(key:K,`): value:V):T Key-value mapping function. +- `fn` (`fun(key:K, value:V):T`): Key-value mapping function. **Return**: @@ -435,7 +435,7 @@ Call a function for each value in the table. **Parameters**: - `t` (`table`): Input table. -- `fn` (`fun(value:V,`): key:K) Function invoked for each entry. +- `fn` (`fun(value:V, key:K)`): Function invoked for each entry. **Return**: @@ -461,7 +461,7 @@ Iterate key-value pairs in sorted key order. **Return**: -- `table, index?: K):(K, V) iterator Sorted pairs +- `iterator` (`fun(table: table, index?: K):(K, V)`): Sorted pairs iterator. - **value** (`T`)