Module:User:DTLHS/category tree export

Hello, you have come here looking for the meaning of the word Module:User:DTLHS/category tree export. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:User:DTLHS/category tree export, but we will also tell you about its etymology, its characteristics and you will know how to say Module:User:DTLHS/category tree export in singular and plural. Everything you need to know about the word Module:User:DTLHS/category tree export you have here. The definition of the word Module:User:DTLHS/category tree export will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:User:DTLHS/category tree export, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local export = {}

function export_tree(m_data, raise_case)
	local result = {}
	
	for k,v in pairs(m_data) do
		if raise_case then
			local cat = k:sub(1,1):upper()..k:sub(2)
			table.insert(result, cat)
		else
			table.insert(result, k)
		end
	end
	
	return ''
end

function export.topic_cat()
	local m_data = require("Module:category tree/topic cat/data")
	return export_tree(m_data, true)
end

function export.pos_cat()
	local m_data = require("Module:category tree/poscatboiler/data")
	return export_tree(m_data, false)
end

return export