{"id":"mrkirdid/commonutils","name":"commonutils","scope":"mrkirdid","platform":"roblox","description":"A focused Roblox utility library for math, tables, instances, tweening, raycasts, state machines, pathfinding, and more.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"howmanysmall/janitor":{"version":"^1.18.3","alias":"Janitor"},"evaera/promise":{"version":"^4.0.0","alias":"Promise"},"lucasmzreal/fastsignal":{"version":"^10.4.0","alias":"Signal"}},"integrity":"55a77a934a145bcd34aceee4b9efb319f6e36fbe5b9b25e0c6a0f32d3c872b5d","likes":0,"downloads":0,"install":"forest install mrkirdid/commonutils","url":"https://forest.dev/p/roblox/mrkirdid/commonutils","files":"https://api.forest.dev/ai/package/roblox/mrkirdid/commonutils/files","readme":"# CommonUtils\n\nCommonUtils is a Roblox utility package for common math, table, string, instance, pathfinding, tween, raycast, UI, and state-management work.\n\nIt is set up as a normal Wally package and can be required directly from `ReplicatedStorage.Packages.CommonUtils` after installation.\n\n## Install\n\nAdd the package to your project's `wally.toml`:\n\n```toml\n[dependencies]\nCommonUtils = \"mrkirdid/commonutils@^0.1.0\"\n```\n\nThen install dependencies:\n\n```bash\nwally install\n```\n\n## Require\n\n```luau\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\nlocal Packages = ReplicatedStorage:WaitForChild(\"Packages\")\n\nlocal CommonUtils = require(Packages:WaitForChild(\"CommonUtils\"))\n```\n\nThe package also depends on Wally-managed aliases for `Promise`, `Signal`, and `Janitor`, and re-exports them from the package root for convenience.\n\n## Quick Examples\n\n### Number formatting\n\n```luau\nlocal CommonUtils = require(game.ReplicatedStorage.Packages.CommonUtils)\n\nprint(CommonUtils.Format.commas(1234567))\nprint(CommonUtils.Format.compactNumber(15320))\nprint(CommonUtils.String.formatThousands(987654321))\n```\n\n### Retry work with `Task.retry`\n\n```luau\nlocal CommonUtils = require(game.ReplicatedStorage.Packages.CommonUtils)\n\nlocal success, value, err = CommonUtils.Task.retry(3, function()\n\treturn workspace:FindFirstChild(\"SpawnLocation\") or error(\"SpawnLocation missing\")\nend, 0.1)\n\nif success then\n\tprint(\"Found\", value)\nelse\n\twarn(err)\nend\n```\n\n### Observe tag lifecycle\n\n```luau\nlocal CommonUtils = require(game.ReplicatedStorage.Packages.CommonUtils)\n\nlocal observer = CommonUtils.Collection.observeTag(\"Enemy\", function(model)\n\tprint(\"spawned\", model)\nend, function(model)\n\tprint(\"removed\", model)\nend)\n\n-- Later:\nobserver:Disconnect()\n```\n\n### Pool and release objects in bulk\n\n```luau\nlocal CommonUtils = require(game.ReplicatedStorage.Packages.CommonUtils)\n\nlocal pool = CommonUtils.ObjectPool.new(function()\n\treturn Instance.new(\"Part\")\nend, {\n\treset = function(part)\n\t\tpart.CFrame = CFrame.new()\n\tend,\n})\n\nlocal partA = pool:acquire()\nlocal partB = pool:acquire()\n\npool:releaseAll()\n```\n\n## Modules\n\n### Core data and text\n\n- `Table`\n- `String`\n- `Format`\n- `Enum`\n- `Debug`\n\n### Math and geometry\n\n- `Math`\n- `Vector2`\n- `Vector3`\n- `CFrame`\n- `Color`\n- `Sequence`\n- `Curves`\n- `Bezier`\n- `Random`\n\n### Instances and world helpers\n\n- `Instance`\n- `Raycast`\n- `Pathfinding`\n- `Collection`\n\n### Async and state\n\n- `Task`\n- `Timer`\n- `Tween`\n- `Spring`\n- `Cooldown`\n- `StateMachine`\n- `ObjectPool`\n\n### Client-focused helpers\n\n- `Mouse`\n- `Input`\n- `UI`\n\nClient-focused modules should only be required in client contexts where the corresponding services are available.\n\n## Root Exports\n\nThe package root exports all utility modules plus these dependency aliases:\n\n- `CommonUtils.Promise`\n- `CommonUtils.Signal`\n- `CommonUtils.Janitor`\n\n## Development\n\nInstall dependencies with Wally:\n\n```bash\nwally install\n```\n\nFocused TestEZ specs live under `Tests/` and are intended to run from the Rojo project defined in `test.project.json`.\n\n## License\n\nMIT","readmeTruncated":false}