A library for Easy Jevko, a simple format built on Jevko.
Transforms Jevko to Lua values and back.
jevko.lua 0.1.0
-- a copy is included.
- Simple
- Lightweight: ~ 4 KiB.
Copy the easyjevko.lua file into your project and require it:
easyjevko = require "easyjevko"
You can now use the following functions:
Input: string which contains a Jevko.
Description:
- A Jevko without subjevkos is converted to a string.
- A Jevko with subjevkos is converted to a table. The first subjevko decides the kind of table:
- If the first subjevko has empty or whitespace-only prefix then the Jevko will be converted to an array.
- Otherwise the Jevko will be converted to a map.
- Leading and trailing spaces in object keys are ignored.
Output: Lua table/string.
easyjevko.from_string("a [b]") // -> {a = "b"}