search/
Start typing to search packages!
package_2
llama
By @freddylist
Roblox
Mirrored📚 Llama 🦙
Lua Library for Immutable Data
[image: Llama]
Installation
There are a few ways to get started with Llama.
Method 1: Import model file
- Download the
.rbxmxmodel file from the latest release on the Llama releases page. - Insert the model anywhere in a Roblox place!
Method 2: Good ol' copy + paste
- Copy the
srcdirectory of Llama into your project. - Rename it to
Llama. - Make sure you put
tunder the Llama directory. (this step will hopefully be resolved in the future by package managers or Luau type-checking) - Use something like Rojo to sync your project to Roblox Studio!
Method 3: Git submodule
- Navigate to where you want to keep your submodules in Git bash.
- Run
git submodule add https://github.com/F-RDY/llama.git. - Using something like Rojo, set up your project to sync
Llama/srcinto Roblox Studio!
Method 4: Package manager
Coming Soon™
Usage
Basic usage
To use Llama, simply require it as a module from where you installed it! It is also recommended that you set Llama.Dictionary, Llama.List, and Llama.Set to their own variables; otherwise, you'll be typing a lot!
-- Other modules...
local Llama = require(LlamaPath)
local Dictionary = Llama.Dictionary
local List = Llama.List
local Set = Llama.Set
Usage with Roact and Rodux
Rodux requires your state to be immutable, so Llama is a great choice for manipulating it!
local function reducer(state, action)
if action.type == "Add" then
return Dictionary.merge(state, {
counter = counter + 1
})
elseif action.type == "Subtract" then
return Dictionary.merge(state, {
counter = counter - 1
})
end
end
Visit the docs for examples and API reference.
Special Thanks
- Mathilde for the Llama icon
- Llama's contributors
What's in a name?
Llamas are members of the Camelid group of mammals along with alpacas, camels, and dromedaries, which are known for being very stubborn but reliable animals.
Package Details
Install command (Click to copy)
Version
1.1.1
License
MIT
Safe for commercial use
Automated license review — not legal advice.
