Открыть меню
Открыть персональное меню
Вы не представились системе
Your IP address will be publicly visible if you make any edits.

Модуль:Lua/doc

Материал из wiki.iccup.org

Это страница документации Модуль:Lua.

Some functions for checking the existence of modules and loading them in the iCCup environment.

API[править код]

Программное имя: Lua


moduleExists (name: string) → boolean

Checks if a module with the given name exists.


{{#iccupdb_datapoint:API_Lua/doc_moduleExists

     |type=api
     |name=moduleExists
     |information=
     |image=
     |date=
     |extradata={{#iccupdb_create_json:
       |description=Checks if a module with the given name exists.
       |params=name: string
       |returns=boolean
       |module=Module:Lua
     }}
   }}


requireIfExists (name: string, options: table) → Module require or default

Requires the module if it exists and returns the default otherwise.


{{#iccupdb_datapoint:API_Lua/doc_requireIfExists

     |type=api
     |name=requireIfExists
     |information=
     |image=
     |date=
     |extradata={{#iccupdb_create_json:
       |description=Requires the module if it exists and returns the default otherwise.
       |params=name: string, options: table
       |returns=Module require or default
       |module=Module:Lua
     }}
   }}


loadDataIfExists (name: string) → Module data or default

Loads the module data if the module exists and returns the default otherwise.


{{#iccupdb_datapoint:API_Lua/doc_loadDataIfExists

     |type=api
     |name=loadDataIfExists
     |information=
     |image=
     |date=
     |extradata={{#iccupdb_create_json:
       |description=Loads the module data if the module exists and returns the default otherwise.
       |params=name: string
       |returns=Module data or default
       |module=Module:Lua
     }}
   }}


import (name: string, options: table?) → Module

Imports a module by its name. If in development mode, the corresponding `/dev` module may be loaded instead.


{{#iccupdb_datapoint:API_Lua/doc_import

     |type=api
     |name=import
     |information=
     |image=
     |date=
     |extradata={{#iccupdb_create_json:
       |description=Imports a module by its name. If in development mode, the corresponding `/dev` module may be loaded instead.
       |params=name: string, options: table?
       |returns=Module
       |module=Module:Lua
     }}
   }}


Посмотрите всю нашу документацию iCCup здесь.


Содержание