Module:Electowidget/doc

From electowiki
Revision as of 03:06, 7 September 2023 by RobLa (talk | contribs) (Adding prefs_line_json in the name of doing test-driven development)

This is the documentation page for Module:Electowidget

This is the very beginning of a Lua implementation of Electowidget.

Tests

Test 1

{{#invoke:Electowidget|parse_prefs_line|24: "蘇業"/5 > DGM/2 = AM/2 > SBJ/}}

Result 1

table

Test 2

{{#invoke:Electowidget|prefs_line_json|24: "蘇業"/5 > DGM/2 = AM/2 > SBJ/}}

Result 2

{"prefs":[{"name":"foo1","rating":1},{"name":"foo2","rating":2}],"qty":9999,"orderedlist":true}

Test 3

{{#invoke:Electowidget|get_data}}

Result 3

Lua error: bad argument #1 to 'title.new' (number or string expected, got nil).