Skip to content

BlueLua/mods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,015 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Mods

LuaRocks CI Status Lua Versions Platform License

mods is a comprehensive Lua utility library featuring lazy-loaded modules and wide runtime compatibility.

See the documentation for full API references and guides.

✨ 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

luarocks install mods

πŸš€ Usage

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"

Sponsor this project

Contributors