{"id":"nazumahk/janitor","name":"janitor","scope":"nazumahk","platform":"roblox","description":"Janitor for Roblox","version":"1.0.2","latest":"1.0.2","versions":["1.0.0","1.0.1","1.0.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"nazumahk/vow":{"version":"^1.0.0","alias":"Vow"}},"integrity":"50e720b1b99014bfef553c2ae052ad66124832ff9f46bbb09f0355e4415cca2d","likes":0,"downloads":0,"install":"forest install nazumahk/janitor","url":"https://forest.dev/p/roblox/nazumahk/janitor","files":"https://api.forest.dev/ai/package/roblox/nazumahk/janitor/files","readme":"# Janitor\n\nA strictly typed, high-performance resource management library for Luau.\n\n## Features\n\n- **Strict Generics**: Full type safety with `<T>` and variadic `<A...>` generics across all registration methods.\n- **Vow Integration**: Native support for cancelling asynchronous tasks registered via `AddVow`.\n- **Index-Based Retrieval**: Named resources can be retrieved, replaced, or individually removed at any time.\n- **Thread-Safe Cleanup**: Coroutine cancellation handled via `FastDefer` to avoid self-cancellation panics.\n- **Zero-Overhead Linking**: Instance destruction events automatically trigger cleanup via `LinkToInstance`.\n\n## Installation\n\nAdd to your `wally.toml`:\n\n```toml\n[dependencies]\nJanitor = \"nazumahk/janitor@1.0.1\"\n```\n\n## Quick Start\n\n```luau\nlocal Janitor = require(path.to.Janitor)\n\nlocal janitor = Janitor.new()\n\n-- Register an instance\nlocal part = janitor:Add(Instance.new(\"Part\"))\n\n-- Register a connection\njanitor:Add(RunService.Heartbeat:Connect(function() end))\n\n-- Register a cleanup function\njanitor:Add(function()\n    print(\"cleaned up\")\nend, true)\n\n-- Register a Vow (cancelled automatically if not settled)\njanitor:AddVow(Vow.delay(10))\n\n-- Link to instance destruction\njanitor:LinkToInstance(workspace.SomePart)\n\n-- Dispose all resources\njanitor:Cleanup()\n```\n\n## Documentation\n\n- [Why Use Janitor?](docs/WhyUseJanitor.md) -- Benefits and Case Studies\n- [Technical Architecture](docs/Architecture.md) -- Internal Design & Optimizations\n- [API Reference](docs/API.md) -- Full Method Specification\n\n## License\nMIT\n","readmeTruncated":false}