Module:Docbunto/infoboxFunctions

-- Code based on AmericanHorrorStory:Docbunto/infoboxFunctions

--- Functions for Docbunto documentation infoboxes -- @module Infobox -- @alias I --  @class infobox local I = {}

local getArgs = require('Module:Arguments').getArgs local wdsButton = require('Dev:WDS Button') --- Module release status. -- -- @param        {Frame} frame Frame invocation object. -- @returns {string} Module release status badge. function I.moduleStatus(frame) local args = getArgs(frame) local statuses = { stable = 'Stable', beta = 'Beta', experimental = 'Experimental', unstable = 'Unstable', archive = 'Archived', unmaintained = 'Unmaintained' }   local value = mw.ustring.lower(args.status or '') local status = statuses[value] and value or 'unknown' if status == 'unknown' then return nil end local badge = wdsButton._badge(statuses[status] or 'Unknown', status) return badge end

return I