Module:Sandbox/Þjarkur/IPAc-is/data

-- This module processes data for Module:IPAc-en. It is intended to be -- loaded with mw.loadData.

local PHONEME_MODULE = 'Module:Sandbox/Þjarkur/IPAc-is/phonemes'

local function makeData(oldData) local newData = {} for i, old in ipairs(oldData) do   local new = {} for k, v in pairs(old) do     if k ~= 'aliases' and k ~= 'code' then new[k] = v     end end newData[old.code] = new if old.aliases then for i, alias in ipairs(old.aliases) do       newData[alias] = new end end end return newData end

local function main return { phonemes = makeData(require(PHONEME_MODULE)) } end

return main