Jump to content
Wikipedia The Free Encyclopedia

Module:Unicode data/datasets

From Wikipedia, the free encyclopedia
Module documentation[create] [purge]
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
 localexport={}

 localunpack=unpackortable.unpack-- Lua 5.2 compatibility

 functionexport.dataset(dataset_name)
 localdataset=mw.ext.data.get(dataset_name)

 ifnotdatasetthenerror("Dataset "..dataset_name.." not found")end
 localdata=dataset.data
 localresult={}

 for_,iteminipairs(data)do
 localcharcode_hex,filename=unpack(item)
 result[tonumber(charcode_hex)]=filename
 end

 returnresult
 end

 returnexport

AltStyle によって変換されたページ (->オリジナル) /