Module:Sandbox/DarthKitty/Frame witchcraft

local p = {} local inspect = require('Dev:Inspect')

function p.keepMetatable(frame) local clone = mw.clone(frame)

clone.args.first = nil

return ' ' .. inspect(clone) .. ' ' end

function p.removeMetatable(frame) local clone = mw.clone(frame)

setmetatable(clone.args, nil) clone.args.first = nil

return ' ' .. inspect(clone) .. ' ' end

function p.reattachMetatable(frame) local clone = mw.clone(frame) local tmp = getmetatable(clone.args)

setmetatable(clone.args, nil) clone.args.first = nil setmetatable(clone.args, tmp)

return ' ' .. inspect(clone) .. ' ' end

return p