{"id":19824739,"url":"https://github.com/combinecommunity/combineprintout","last_synced_at":"2025-05-01T13:31:36.742Z","repository":{"id":63907132,"uuid":"202588314","full_name":"CombineCommunity/CombinePrintout","owner":"CombineCommunity","description":"A Combine micro debugging package","archived":false,"fork":false,"pushed_at":"2019-08-15T18:31:49.000Z","size":32,"stargazers_count":55,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T22:12:45.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://combineopensource.org","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/CombineCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T18:00:38.000Z","updated_at":"2024-05-28T01:34:13.000Z","dependencies_parsed_at":"2022-11-28T22:52:27.960Z","dependency_job_id":null,"html_url":"https://github.com/CombineCommunity/CombinePrintout","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CombineCommunity%2FCombinePrintout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CombineCommunity%2FCombinePrintout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CombineCommunity%2FCombinePrintout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CombineCommunity%2FCombinePrintout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CombineCommunity","download_url":"https://codeload.github.com/CombineCommunity/CombinePrintout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251881691,"owners_count":21659143,"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","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":[],"created_at":"2024-11-12T11:05:43.002Z","updated_at":"2025-05-01T13:31:36.434Z","avatar_url":"https://github.com/CombineCommunity.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Combine Printout Logo](https://github.com/combineopensource/CombinePrintout/raw/master/Assets/combine-printout.png)\n\nA Combine micro debugging framework. It helps you log subscription events to the console so you can track their life cycle.\n\n## Usage\n\n#### A debugging print sink\n\nThe built-in `print()` operator is useful but you still need to add a subscriber to your subscription. `printSink()` is a subscriber that you can use to debug a subscription without the need to add a separate subscriber like so:\n\n```swift\nJust([\"One\", \"Two\"])\n  .printSink()\n```\n\n`printSink()` will subscribe the publisher and log all events like so:\n\n```none\nSink: output([\"One\", \"Two\"]) \nSink: finished\n```\n\n#### A debugging print cancellable\n\nIf you're building more complex memory management logic or not sure when are your cancellables released you can use `printCancellable()` to log a given `Cancellable`'s life cycle like so:\n\n```swift\nJust([\"One\", \"Two\"])\n  .assign(to: \\.model, on: self)\n  .printCancellable()\n  .store(in: \u0026subscriptions)\n```\n\n`printCancellable()` wraps the `AnyCancellable` returned from `assign(to:on:)` and logs all the received events:\n\n```none\nCancellable: init \n... \n(self.subscriptions is released from memory)\n...\nCancellable: cancel \nCancellable: deinit \n```\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following dependency to your **Package.swift** file:\n\n```swift\n.package(url: \"https://github.com/combineopensource/CombinePrintout, from: \"0.2\")\n```\n## License\n\nCombineOpenSource is available under the MIT license. See the LICENSE file for more info.\n\n\n## Credit\n\nCopyright (c) 2019 Combine Open Source\n\nCreated by: Marin Todorov\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombinecommunity%2Fcombineprintout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcombinecommunity%2Fcombineprintout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcombinecommunity%2Fcombineprintout/lists"}