Auto-generated by adoc (tools/gen-apidocs.lua) — do not edit by hand.
These are the libraries intended for use from your own programs via
require(...).
No public functions found.
No public functions found.
parse(...) — returns table of results or (nil, reason). Prints on help/error.
request(method, url, opts) -> response | nil, err
getJSON(url) -> decoded, response | nil, err
download(url, path, opts) -> true | nil, err
opts.sha256 (hex) verifies integrity; opts.onProgress(bytes) for UI.
Writes atomically: temp file, verify, then rename into place.
encode(message) -> wire string. Messages are JSON objects under a magic tag
so unrelated modem traffic on the same port is ignored.
decode(wire) -> message | nil (nil if not an anet frame / malformed)
recv(port, timeout) -> fromAddress, message | nil, "timeout"
call(addr, port, method, params, timeout) -> result | nil, err
serve(port, handlers, opts) — loop handling requests. opts.once stops after one.
split("a,b,,c", ",") -> {"a","b","","c"}. If plain is false, sep is a pattern.
merge(a, b) -> new table with b's keys overriding a's (shallow).
humanBytes(1536) -> "1.5K"
atomicWrite: write to .tmp-, fsync via close, then rename over the
target. A crash mid-write never leaves a half-written destination file.
mkdirs: create a directory and all missing parents. Idempotent.
ensureParent: make sure the directory that will hold path exists.
sha256(data) -> lowercase hex. Prefers the data card if available.
always use the pure-Lua path (testing / determinism)
compare(a, b) -> -1 | 0 | 1
satisfies(version, constraint) -> boolean
max(list-of-version-strings) -> highest, or nil
best(list, constraint) -> highest version satisfying constraint
is the current token op/keyword equal to v?
Lua 5.4 / attributes — tolerated for forward compatibility.
format(src [, opts]) -> formatted source | nil, err
extract(src) -> {items = { {name=, signature=, doc=, kind=, line=} , ... }}
markdown(src, opts) -> string | nil, err