{"id":28916389,"url":"https://github.com/intuit/swift-hooks","last_synced_at":"2025-09-11T14:05:12.222Z","repository":{"id":40477121,"uuid":"478237285","full_name":"intuit/swift-hooks","owner":"intuit","description":"A little module for plugins, in swift. ","archived":false,"fork":false,"pushed_at":"2023-11-25T14:56:19.000Z","size":341,"stargazers_count":10,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-21T23:41:00.821Z","etag":null,"topics":["plugins","swift","tapable"],"latest_commit_sha":null,"homepage":"https://intuit.github.io/swift-hooks/documentation/swifthooks/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intuit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-05T17:40:47.000Z","updated_at":"2023-09-25T21:37:07.000Z","dependencies_parsed_at":"2025-06-21T23:40:51.180Z","dependency_job_id":"628efd83-be8b-4e08-881b-df8c748a0b01","html_url":"https://github.com/intuit/swift-hooks","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/intuit/swift-hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fswift-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fswift-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fswift-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fswift-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intuit","download_url":"https://codeload.github.com/intuit/swift-hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fswift-hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266496399,"owners_count":23938711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugins","swift","tapable"],"created_at":"2025-06-21T23:39:13.319Z","updated_at":"2025-07-22T12:34:06.758Z","avatar_url":"https://github.com/intuit.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg\n    src=\"Sources/SwiftHooks/Documentation.docc/Resources/Images/hooks@2x.png\"\n    alt=\"SwiftHooks Logo\"\n    width=\"300px\"\n    padding=\"40px\"\n  /\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003cp\u003eSwiftHooks is a little module for plugins, in Swift\u003c/p\u003e\n\u003c/div\u003e\n\n---\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/intuit/auto\"\u003e\u003cimg src=\"https://img.shields.io/badge/release-auto.svg?colorA=888888\u0026colorB=9B065A\u0026label=auto\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAACzElEQVR4AYXBW2iVBQAA4O+/nLlLO9NM7JSXasko2ASZMaKyhRKEDH2ohxHVWy6EiIiiLOgiZG9CtdgG0VNQoJEXRogVgZYylI1skiKVITPTTtnv3M7+v8UvnG3M+r7APLIRxStn69qzqeBBrMYyBDiL4SD0VeFmRwtrkrI5IjP0F7rjzrSjvbTqwubiLZffySrhRrSghBJa8EBYY0NyLJt8bDBOtzbEY72TldQ1kRm6otana8JK3/kzN/3V/NBPU6HsNnNlZAz/ukOalb0RBJKeQnykd7LiX5Fp/YXuQlfUuhXbg8Di5GL9jbXFq/tLa86PpxPhAPrwCYaiorS8L/uuPJh1hZFbcR8mewrx0d7JShr3F7pNW4vX0GRakKWVk7taDq7uPvFWw8YkMcPVb+vfvfRZ1i7zqFwjtmFouL72y6C/0L0Ie3GvaQXRyYVB3YZNE32/+A/D9bVLcRB3yw3hkRCdaDUtFl6Ykr20aaLvKoqIXUdbMj6GFzAmdxfWx9iIRrkDr1f27cFONGMUo/gRI/jNbIMYxJOoR1cY0OGaVPb5z9mlKbyJP/EsdmIXvsFmM7Ql42nEblX3xI1BbYbTkXCqRnxUbgzPo4T7sQBNeBG7zbAiDI8nWfZDhQWYCG4PFr+HMBQ6l5VPJybeRyJXwsdYJ/cRnlJV0yB4ZlUYtFQIkMZnst8fRrPcKezHCblz2IInMIkPzbbyb9mW42nWInc2xmE0y61AJ06oGsXL5rcOK1UdCbEXiVwNXsEy/6+EbaiVG8eeEAfxvaoSBnCH61uOD7BS1Ul8ESHBKWxCrdyd6EYNKihgEVrwOAbQruoytuBYIFfAc3gVN6iawhjKyNCEpYhVJXgbOzARyaU4hCtYizq5EI1YgiUoIlT1B7ZjByqmRWYbwtdYjoWoN7+LOIQefIqKawLzK6ID69GGpQgwhhEcwGGUzfEPAiPqsCXadFsAAAAASUVORK5CYII=\" alt=\"Auto Release\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://circleci.com/gh/intuit/swift-hooks\"\u003e\u003cimg alt=\"CircleCI\" src=\"https://img.shields.io/circleci/build/github/intuit/swift-hooks\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/intuit/swift-hooks\"\u003e\u003cimg src=\"https://codecov.io/gh/intuit/swift-hooks/branch/main/graph/badge.svg?token=AGIZZ0WFUR\"/\u003e\u003c/a\u003e\n\u003cimg alt=\"Cocoapods\" src=\"https://img.shields.io/cocoapods/v/SwiftHooks\"\u003e\n\u003cimg alt=\"Cocoapods platforms\" src=\"https://img.shields.io/cocoapods/p/SwiftHooks\"\u003e\n\u003cimg alt=\"License\" src=\"https://img.shields.io/cocoapods/l/SwiftHooks\"\u003e\n\u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/intuit/swift-hooks?logo=swift\"\u003e\n\u003ca href=\"https://intuit.github.io/swift-hooks/documentation/swifthooks/\"\u003e\u003cimg alt=\"GitHub Pages\" src=\"https://img.shields.io/badge/docs-pages-green\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nA `Hook` represents a \"pluggable\" point in a software model. They provide a mechanism for \"tapping\" into such points to get updates, or apply additional functionality to some typed object.\n\n### Variety of built in hook types\n| Type | Behavior |\n|------|----------|\n| Basic | Executes the taps with no return value |\n| Waterfall | \"Reduce\" the result through all the taps |\n| Bail | Retrieve the result of the first tap that handles the calling value |\n| Loop | Execute taps until no taps request the loop be restarted |\n\nVisit our [site](https://intuit.github.io/swift-hooks/documentation/swifthooks/) for information about how to use SwiftHooks.\n\n## Inspiration\n\nAt Intuit, we're big fans of [tapable](https://github.com/webpack/tapable), and plugin architecture. This package is the Swift companion to the Kotlin [hooks](https://github.com/intuit/hooks/). These are packages we use to enable extensible software, keeping extensions isolated to those that need them, avoiding bloat in primary projects.\n\n## Installation\n\n#### Swift Package Manager\n\nInstall with [Swift Package Manager](https://www.swift.org/package-manager/) by adding a reference to your `Package.swift` dependencies:\n\n```swift\nlet package = Package(\n    ...\n    dependencies: [\n        .package(url: \"https://github.com/intuit/swift-hooks.git\", from: \"0.0.1\")\n    ]\n)\n```\n\n#### CocoaPods\n\nInstall with [CocoaPods](https://cocoapods.org/) by adding an entry to your `Podfile`, and then running `pod install`:\n\n```ruby\npod 'SwiftHooks'\n```\n\n## Structure\n\n- [SwiftHooks](https://github.com/intuit/swift-hooks/tree/main/Sources/SwiftHooks) - The SwiftHooks implementation\n- [ExampleLibrary](https://github.com/intuit/swift-hooks/tree/main/Sources/ExampleLibrary) - An example usage of SwiftHooks\n\n## Contributing\n\nFeel free to make an [issue](https://github.com/intuit/swift-hooks/issues) if you are having trouble or open a [pull request](https://github.com/intuit/swift-hooks/pulls) if you have an improvement to add!\n\nMake sure to read our [code of conduct](./.github/CODE_OF_CONDUCT.md).\n\n### Build\nThis is a Swift only package, so it can be built easily from the command line:\n```bash\nswift build\n```\n\n### Test\nRunning tests in parallel is preffered as it completes much faster:\n```bash\nswift test --parallel\n```\n\n### Lint\nThis project uses [SwiftLint](https://github.com/realm/SwiftLint) for linting, and follows the default conventions:\n```bash\nswift run swiftlint\n```\n\n#### Formatting\nThis project is also set up for [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) to automatically format code:\n```bash\nswift run swiftformat Sources\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Fswift-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintuit%2Fswift-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Fswift-hooks/lists"}