{"id":"b0nn133/bindable","name":"bindable","scope":"b0nn133","platform":"roblox","description":"Bindable is an extremely lightweight & fast implementation of RBXScriptSignal.","version":"2.1.6","latest":"2.1.6","versions":["2.1.1","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"85a5a541a89b06ad5685808d6e6ccd419be1e226887b664926884a897d3d8aae","likes":0,"downloads":0,"install":"forest install b0nn133/bindable","url":"https://forest.dev/p/roblox/b0nn133/bindable","files":"https://api.forest.dev/ai/package/roblox/b0nn133/bindable/files","readme":"<div align=\"center\">\n<img src=\"./assets/thumbnail.png\" alt=\"Bindable\" width=\"500\">\n<br>\n<a href=\"https://codeberg.org/lustre/bindable/releases\">\n  <img src=\"./assets/get_button.png\" alt=\"Get\" width=\"100\">\n</a>\n<hr>\n</div>\n\nBindable is an extremely lightweight & fast implementation of `RBXScriptSignal`.\n\n## Why Bindable?\n* Almost fully replicates `RBXScriptSignal`'s behavior\n* Lightweight & fast\n* Open-source\n* 4X faster than Roblox's `BindableEvent`\n\n## Usage\n\n_Connection Example:_\n```lua\nlocal Bindable = require(game.Path.To.Bindable)\nlocal HelloPlayer = Bindable.new()\n\nHelloPlayer:Connect(function(Player)\n    print(\"Hello, \" .. Player.Name .. \"!\")\nend)\n\ngame.Players.PlayerAdded:Connect(function(Player)\n    HelloPlayer:Fire(Player) -- Hello, Username!\nend)\n```\n\n_Multi-Connections Example:_\n```lua\nlocal Bindable = require(game.Path.To.Bindable)\nlocal HelloPlayer = Bindable.new()\n\nHelloPlayer:Connect(function(Player)\n    print(\"Hello, \" .. Player.Name .. \"!\")\nend)\n\nHelloPlayer:Connect(function(Player)\n    print(\"Hello, \" .. Player.DisplayName.. \"!\")\nend)\n\ngame.Players.PlayerAdded:Connect(function(Player)\n    HelloPlayer:Fire(Player) -- Hello, Username!, Hello, DisplayName!\nend)\n```\n\n_Once Example:_\n```lua\nlocal Bindable = require(game.Path.To.Bindable)\nlocal HelloPlayer = Bindable.new()\n\nHelloPlayer:Once(function(Player)\n    print(\"Hello, \" .. Player.Name .. \"!\")\nend)\n\ngame.Players.PlayerAdded:Connect(function(Player)\n    HelloPlayer:Fire(Player) -- Hello, Username!\n    task.wait(2)\n    HelloPlayer:Fire(Player) -- Nothing\nend)\n```\n\n_Wrap Example:_\n```lua\nlocal Bindable = require(game.Path.To.Bindable)\nlocal Part = workspace.Part\nlocal onNameChanged = Bindable.Wrap(Part:GetPropertyChangedSignal(\"Name\"))\n\nonNameChanged:Connect(function()\n    print(\"Name of Part was changed to: \" .. Part.Name)\nend)\n\nPart.Name = \"Bindable\"\n```\n\n**If you've found any bugs - create an issue or report them in the [DevForum Post](https://devforum.roblox.com/t/bindable-an-extremely-lightweight-fast-rbxscriptsignal-implementation/4760861).**\n\n**Credits:**\\\n[stravant's GoodSignal](https://github.com/stravant/goodsignal) _(Inspired by)_","readmeTruncated":false}