{"id":"7kayoh/finder","name":"finder","scope":"7kayoh","platform":"roblox","description":"Find Instances with conditions, and perform action on them!","version":"0.1.3","latest":"0.1.3","versions":["0.1.0","0.1.1","0.1.2","0.1.3"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":false,"dependencies":{},"integrity":"e6492a87331211742f2f92d9e4be297b39146cc3337ad6747bbf8eae8a139b2f","likes":0,"downloads":0,"install":"forest install 7kayoh/finder","url":"https://forest.dev/p/roblox/7kayoh/finder","files":"https://api.forest.dev/ai/package/roblox/7kayoh/finder/files","readme":"# Finder\n\nFind Instances with conditions, and perform action on them!\n\n## API Reference\n\n### `Finder.find(target: {Instance}, condition: Condition, behavior: Behavior?): {Instance}|any?`\n\nPerforms a search on the specified Instances with the `condition`, returns a table of Instances if the `condition` returned true.\n\nIf `behavior` is supplied, returns the result from `behavior`.\n\n### `Finder.addTemplate(category: string, name: string, condition: Condition): boolean`\n\nAdds a new template to Finder with the specified category and name. If the name exists in the specified category already, Finder will not add the template and returns `false` with a warn.\n\nIf the specified category does not exist, Finder will create the category manually.\n\n### `Finder.getTemplate(category: string, name: string): Condition`\n\nReturns the specified template. If the category or the template name does not exist in the specified category, returns a dummy `Condition` that returns `false`, with a warn.\n\n## Template treeview\n```lua\nlocal Finder = {\n    Templates = {\n        CategoryName = {\n            TemplateName: Condition = function(value: any, object: Instance): boolean\n                return object ~= nil\n            end\n        }\n    }\n}\n```\n\n## Types\n```lua\nexport type Condition = (value: any, object: Instance) -> (boolean)\nexport type Behavior = (result: {Instance}) -> ()\n```","readmeTruncated":false}