{"id":"wiam77/lightsignal","name":"lightsignal","scope":"wiam77","platform":"roblox","description":"Lightweight signal implementation","version":"0.2.0","latest":"0.2.0","versions":["0.2.0"],"license":"GPL-3.0","licenseRating":"unsafe","licenseCaveats":["Strong copyleft: shipping this in your game plausibly requires releasing your game's entire source under GPL-3.0. Not recommended for closed-source projects.","The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{},"integrity":"2e2af27c995ce306d110d8f10ed7731ca767599d1fa2369ca8f566a4ca7e8329","likes":0,"downloads":0,"install":"forest install wiam77/lightsignal","url":"https://forest.dev/p/roblox/wiam77/lightsignal","files":"https://api.forest.dev/ai/package/roblox/wiam77/lightsignal/files","readme":"# lightsignal\n`lightsignal` is a minimal signal implementation for the Roblox and Lune runtimes (or any Luau runtime with the `task` library, really),\ninspired by [GoodSignal](https://github.com/stravant/goodsignal), with a twist: there are no connections.\nInstead, you can directly reference a signal's callbacks.\n\n# Installation\n## Pesde\n```console\n# pesde add wiam/rl && pesde install\n```\n\n## Wally\nAdd the following to your `wally.toml`, in the `[dependencies]` section:\n```toml\nlightsignal = \"wiam77/lightsignal@<version>\"\n```\n\nThen run:\n```console\n# wally install\n```\n\n## npm\n```console\n# npm install @rbxts/lightsignal\n```\n\n# Usage\n```luau\n--!strict\n\nlocal lightsignal = require(\"path/to/rl\")\n\nlocal my_signal : lightsignal.signal<string> = lightsignal.new()\n\nmy_signal:connect(function(message)\n\tprint(message)\nend)\n\nmy_signal:once(function(message)\n\tprint(message)\nend)\n\ntask.delay(1, function()\n\tmy_signal:fire(\"Hello, World!\")\nend)\n\nlocal message = my_signal:wait()\nprint(message)\n```","readmeTruncated":false}