Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Utils: Difference between revisions

From Obby Wiki
No edit summary
Tag: Reverted
m Protected "Module:Utils" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
     if ppc then
     if ppc then
         return function(frame)
         return function(frame)
             mw.log('wrap_function (ppc=true): frame received:')
             return frame:preprocess(f(get_args(frame)))
            mw.logObject(frame)
            if frame == nil then mw.log('wrap_function (ppc=true): frame == nil') end
            local args = get_args(frame)
            mw.log('wrap_function (ppc=true): args from get_args:')
            mw.logObject(args)
            return frame:preprocess(f(args))
         end
         end
     else
     else

Latest revision as of 01:12, 4 April 2025

Documentation for this module may be created at Module:Utils/doc

-- roblox.fandom.com
local get_args = require('Module:Arguments').getArgs

local p = {}

function p.wrap_function(f, ppc)
    if ppc then
        return function(frame)
            return frame:preprocess(f(get_args(frame)))
        end
    else
        return function(frame)
            return f(get_args(frame))
        end
    end
end



return p