Module:fun/isCallable: Difference between revisions
m Protected "Module:fun/isCallable": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) |
m 1 revision imported |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
local table_get_metamethod_module = "Module:table/getMetamethod" | local table_get_metamethod_module = "Module:table/getMetamethod" | ||
local require = require | local require = require | ||
local type = type | local type = type | ||
local function get_metamethod(...) | local function get_metamethod(...) | ||
| Line 34: | Line 28: | ||
-- `obj` is callable without actually calling it. | -- `obj` is callable without actually calling it. | ||
elseif not success then | elseif not success then | ||
if allow_maybe then | if allow_maybe then | ||
return nil | return nil | ||