Builtin Library
README.md
shared Module
Part of the deprecated
sctoolbox — superseded by theentityOps/scene/appearancetoolboxes.
Cross-tool helpers for the sc toolbox. Every tool inside this
toolbox can pull these in with require(".shared").
Purpose
This module holds the small set of helpers that more than one tool in
the toolbox needs — typically the ok(value, formatted?) /
fail(message, exitCode?) constructors that produce the canonical
scToolResult shape, plus any toolbox-wide parsers,
validators, or shared state. Keep it focused: per-tool implementation
stays inside each <x>.tool/init.luau (with its own --!desc /
--!arg / --!return / --!example annotations).
Usage
local shared = require(".shared")
function M.someTool(...)
if not ok then
return shared.fail("reason", 1)
end
return shared.ok(value, "")
end
Exports
See init.luau for the full export surface. Typical exports include
shared.ok(value, formatted?) and shared.fail(message, exitCode?)
for building the toolbox's standard result envelope.