require
require(module) loads and executes a Lua module. CWD-jailed, searching the job’s directory first, then falling back to the project root. Dots in module names convert to path separators (e.g. foo.bar → foo/bar). Modules are cached after first load.
Signature
Section titled “Signature”require(module)
syncParameters
Section titled “Parameters”| Param | Type | Description |
|---|---|---|
module |
string | Module name (dots converted to path separators) |
Returns
Section titled “Returns”| Value | Type | Description |
|---|---|---|
| result | any | Return value of the module |
Example
Section titled “Example”-- In hooks.lualocal utils = require("utils")local result = utils.process_data(data)-- In utils.lua (same job directory)local M = {}function M.process_data(data) return data:upper()endreturn MSee Also
Section titled “See Also”- Lifecycle - How modules are loaded