| description | Common utility helpers. |
|---|
Common utility helpers.
local utils = require("mods.utils")| Function | Description |
|---|---|
quote(v) |
Smart-quotes a string for readable Lua-like output. |
Smart-quotes a string for readable Lua-like output.
print(utils.quote('He said "hi"'))
-- 'He said "hi"'
print(utils.quote([[say "hi" and 'bye']]))
-- "say \"hi\" and 'bye'"