Skip to content

mods ​

TestLuaRocksLua VersionsPlatformLicense

Modular Lua utilities for common tasks - lazy-loaded, zero dependencies.

Check out the documentation for guides and examples.

✨ 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.
  • Lightweight: Pure Lua with no dependencies, except optional LFS for file operations.
  • Multiple Lua Versions: Compatible with LuaJIT, Lua 5.1, 5.2, 5.3, 5.4, and 5.5.
  • Cross-Platform: Works consistently across Windows, macOS, and Linux.

📦 Installation ​

sh
luarocks install mods

🚀 Usage ​

lua
local mods = require "mods"

local stripped = mods.str.strip("   hello world   ")
print(stripped) -- Output: "hello world"