Feature request: convert booleans with aliases like on/yes or off/no
kalekje opened this issue · comments
It's common for many kv interfaces to have aliases for booleans. I would propose that this be an option, and if present, yes or on is converted to true, and no or off is converted to false.
something like this?
local result = luakeys.parse('key=yes', {
true_aliases = { 'true', 'TRUE', 'True', 'on', 'yes' },
false_aliases = { 'false', 'FALSE', 'False', 'off', 'no' },
})
luakeys.debug(result) -- { key = true }
Yes I think an interface like that would be great!