{"id":"freddylist/llama","name":"llama","scope":"freddylist","platform":"roblox","description":"Luau Library for Immutable Data","version":"1.1.1","latest":"1.1.1","versions":["1.1.0","1.1.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"fb2125aa07bf8b9a70d32a4eb1b4db5b20819f77e8762722efad31c990316ba1","likes":0,"downloads":1,"install":"forest install freddylist/llama","url":"https://forest.dev/p/roblox/freddylist/llama","files":"https://api.forest.dev/ai/package/roblox/freddylist/llama/files","readme":"<h1 align=\"center\">📚 Llama 🦙</h1>\r\n<div align=\"center\">\r\n\t<a href=\"https://github.com/freddylist/llama/actions\"><img src=\"https://github.com/freddylist/llama/workflows/CI/badge.svg\" alt=\"GitHub Actions Build Status\" /></a>\r\n\t<a href=\"https://freddylist.github.io/llama\"><img src=\"https://img.shields.io/badge/docs-website-green.svg\" alt=\"Documentation\" /></a>\r\n</div>\r\n<div align=\"center\">\r\n\tLua Library for Immutable Data\r\n</div>\r\n\r\n<div align=\"center\">\r\n\t<img src=\"docs/img/favicon.ico\" width=256 height=256 alt=\"Llama\"></img>\r\n</div>\r\n\r\n## Installation\r\n\r\nThere are a few ways to get started with Llama.\r\n\r\n### Method 1: Import model file\r\n\r\n1. Download the `.rbxmx` model file from the latest release on the [Llama releases page](https://github.com/F-RDY/llama/releases).\r\n2. Insert the model anywhere in a Roblox place!\r\n\r\n### Method 2: Good ol' copy + paste\r\n\r\n1. Copy the `src` directory of Llama into your project.\r\n2. Rename it to `Llama`.\r\n3. Make sure you put [`t`](https://github.com/osyrisrblx/t) under the Llama directory. (this step will hopefully be resolved in the future by package managers or Luau type-checking)\r\n4. Use something like [Rojo](https://github.com/rojo-rbx/rojo) to sync your project to Roblox Studio!\r\n\r\n### Method 3: Git submodule\r\n\r\n1. Navigate to where you want to keep your submodules in Git bash.\r\n2. Run `git submodule add https://github.com/F-RDY/llama.git`.\r\n3. Using something like [Rojo](https://github.com/rojo-rbx/rojo), set up your project to sync `Llama/src` into Roblox Studio!\r\n\r\n### Method 4: Package manager\r\n\r\n*Coming Soon™*\r\n\r\n## Usage\r\n\r\n### Basic usage\r\n\r\nTo 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!\r\n\r\n```lua\r\n-- Other modules...\r\nlocal Llama = require(LlamaPath)\r\n\r\nlocal Dictionary = Llama.Dictionary\r\nlocal List = Llama.List\r\nlocal Set = Llama.Set\r\n```\r\n\r\n### Usage with [Roact](https://github.com/Roblox/roact/) and [Rodux](https://github.com/Roblox/rodux)\r\n\r\nRodux requires your state to be immutable, so Llama is a great choice for manipulating it!\r\n\r\n```lua\r\nlocal function reducer(state, action)\r\n\tif action.type == \"Add\" then\r\n\t\treturn Dictionary.merge(state, {\r\n\t\t\tcounter = counter + 1\r\n\t\t})\r\n\telseif action.type == \"Subtract\" then\r\n\t\treturn Dictionary.merge(state, {\r\n\t\t\tcounter = counter - 1\r\n\t\t})\r\n\tend\r\nend\r\n```\r\n\r\nVisit the [docs](https://freddylist.github.io/llama/) for examples and API reference.\r\n\r\n## Special Thanks\r\n\r\n- [Mathilde](https://www.instagram.com/httpsugars_/) for the Llama icon\r\n- [Llama's contributors](https://github.com/freddylist/llama/graphs/contributors)\r\n\r\n## What's in a name?\r\nLlamas are members of the Camelid group of mammals along with alpacas, camels, and dromedaries, which are known for being very stubborn but reliable animals.\r\n","readmeTruncated":false}