pub fn require(modname: string) -> anyExpand description
Loads the given module. Starts by looking into the package.loaded
table to determine whether modname is already loaded; if so, returns
the stored value. Otherwise, finds a loader for the module by
consulting the searchers in package.searchers, runs it, and caches
its result in package.loaded[modname].
§Examples
local socket = require("socket")
print(require("socket") == socket) --> true (cached in package.loaded)