Module std.prototype
Module table.
Lazy loading of submodules, and metadata for the Prototype package.
Tables
prototype | Module table. |
Metamethods
__index (name) | Lazy loading of prototype modules. |
Tables
Metamethods
- __index (name)
-
Lazy loading of prototype modules.
Don't load everything on initial startup, wait until first attempt
to access a submodule, and then load it on demand.
Parameters:
- name string submodule name
Returns:
-
table or nil
the submodule that was loaded to satisfy the missing
name
, otherwisenil
if nothing was foundUsage:
local prototype = require "prototype" local Object = prototype.object.prototype