mods ​
mods is a comprehensive Lua utility library featuring lazy-loaded modules and wide runtime compatibility.
✨ Features ​
- Predictable APIs: A cohesive collection of helper utilities for common programming tasks and data structures.
- Lazy Loading: Automatic lazy loading of sub-modules to keep startup times fast.
- Cross-Platform: Works consistently across Windows, macOS, and Linux.
- Multiple Lua Versions: Compatible with LuaJIT, Lua 5.1, 5.2, 5.3, 5.4, and 5.5.
- Lightweight: Pure Lua with no dependencies, except optional LFS for file operations.
- Autocomplete: LuaLS type annotations.
📦 Installation ​
sh
luarocks install mods🚀 Usage ​
lua
local mods = require "mods"
local stripped = mods.str.strip(" hello world ")
print(stripped) -- Output: "hello world"
local items = mods.list({ 1, 2, 3 })
local reversed = items:reverse()
print(reversed:join(", ")) -- Output: "3, 2, 1"