{"id":"fly-san/data-structures-in-luau","name":"data-structures-in-luau","scope":"fly-san","platform":"roblox","description":"Simple data structures in luau","version":"0.1.10","latest":"0.1.10","versions":["0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.1.10"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"b275b819beab3849e4f6f9eb4f591748d16900dd48c13b47605c0483f3757bda","likes":0,"downloads":0,"install":"forest install fly-san/data-structures-in-luau","url":"https://forest.dev/p/roblox/fly-san/data-structures-in-luau","files":"https://api.forest.dev/ai/package/roblox/fly-san/data-structures-in-luau/files","readme":"# Data structures in luau\r\n\r\n> Small compilation of data structures written in Luau\r\n\r\nEver wanted to use [structures](https://en.wikipedia.org/wiki/Data_structure) other than arrays or dictionaries in lua? Me neither. But often, using predefined data structures is faster to implement and ultimately saves precious time for programmers.\r\n\r\nThis module contains [object oriented](https://en.wikipedia.org/wiki/Object-oriented_programming) structures \r\n\r\n---\r\n\r\nA proper documentation may be created at some point in the future.\r\n\r\n- Data structures can be created by requiring its module, then calling it with the structure initialization arguments.\r\n\r\nExample:\r\n```lua\r\n  local Queue = require(path/to/location)\r\n  local q = Queue(5) -- Create queue with max size 5\r\n  q:Enqueue(\"Hello, world!\")\r\n  q:Dequeue()\r\n```\r\n\r\n- Methods use PascalCase, e.g. `stack:Push(1)`\r\n- Class functions use camelCase, as in `Stack.tostring(stack)`\r\n\r\n### Caveats\r\n\r\nSome structures have internal `Data` or `Size` properties, but these should not be used externally under normal circumstances. Instead, you should use the provided structure API. Size can usually be obtained with `:GetSize()`.\r\n\r\n# Installation\r\n\r\nYou can use [Wally](https://github.com/UpliftGames/wally), with this repository as a dependency.\r\n\r\n```toml\r\n# Wally config\r\n...\r\n[dependencies]\r\nDataStructures = \"fly-san/data-structures-in-luau@^0.1.7\"\r\n```\r\n\r\n# Data Structures:\r\n\r\nMore data structures, and documentation, to come.\r\n\r\n### Stack\r\n\r\n### Linked list\r\n\r\n### Queue\r\n\r\n### Circular queue (circular buffer, ring)\r\n\r\n### Binary Heap\r\n\r\n## License\r\nThis repository is available under the MIT license.","readmeTruncated":false}