{"id":13565815,"url":"https://github.com/mirego/trikot.streams","last_synced_at":"2025-04-03T23:30:38.185Z","repository":{"id":45366281,"uuid":"189289932","full_name":"mirego/trikot.streams","owner":"mirego","description":"Reactive Streams for Kotlin Multiplatform with mutability checks","archived":true,"fork":false,"pushed_at":"2022-01-21T17:22:49.000Z","size":525,"stargazers_count":33,"open_issues_count":0,"forks_count":1,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-11-04T19:42:13.965Z","etag":null,"topics":["kotlin","kotlin-multiplatform","reactive-streams","streams","trikot"],"latest_commit_sha":null,"homepage":"https://open.mirego.com","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirego.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-29T20:00:05.000Z","updated_at":"2023-04-27T20:45:29.000Z","dependencies_parsed_at":"2022-08-04T14:15:41.226Z","dependency_job_id":null,"html_url":"https://github.com/mirego/trikot.streams","commit_stats":null,"previous_names":[],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Ftrikot.streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Ftrikot.streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Ftrikot.streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Ftrikot.streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirego","download_url":"https://codeload.github.com/mirego/trikot.streams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097590,"owners_count":20883121,"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":["kotlin","kotlin-multiplatform","reactive-streams","streams","trikot"],"created_at":"2024-08-01T13:01:55.978Z","updated_at":"2025-04-03T23:30:37.349Z","avatar_url":"https://github.com/mirego.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# :warning: Warning: this project as been moved\nSee [the new trikot repository](https://github.com/mirego/trikot) for releases starting from 3.0.0.\n\n# Trikot.streams\n\nElegant implementation of ReactiveStreams for Kotlin Multiplatform.\n\n- Manage object immutability in native implementation (Object are frozen when switching threads)\n- Multithread support with ObserveOn and SubscribeOn processors\n- Simplify the management of publishers subscriptions and unsubscriptions\n- Help you focus on what you need to do by hiding Multiplatform complexity\n\n## Sample\n#### Common code\n```kotlin\nclass SearchController() {\n    private val searchKeywordPublisher = Publishers.behaviorSubject\u003cString\u003e(\"keyword\")\n    private val searchResultsPublisher = searchKeywordPublisher.switchMap { keyword -\u003e\n        searchService.search(keyword)\n    }.shared()\n    val searchResultCount = searchResultsPublisher.switchMap { results -\u003e\n        PublisherFactory.create(results.count).toString()\n    }\n    val resultUppercaseTitles = searchResultsPublisher.map { it.title.toUpperCase() }\n    val searchResultCountLabel = searchResultsPublisher.map { \"${it.results.count()} results\" }\n    fun searchFor(keyword: String) {\n       searchKeywordPublisher.value = keyword \n    }\n}\n```\n\n#### Swift\nSee [swift extensions](./swift-extensions/README.md) for more information.\n\nHelps connect a publisher to a variable in a reactive environment.\n```kotlin\nlet label = UILabel()\nlabel.bind(searchController.searchResultCountLabel, \\UILabel.text)\n```\n\n#### Android\nSee [android-ktx](./android-ktx/README.md) for more information.\n\nBinding helpers relies on AndroidViewModel and uses lifecycleOwner to manage subscription and unsubscription. \n```kotlin\nval searchResultLiveData = searchController.searchResultCountLabel.asLiveData()\n```\n\n## [Publishers and Processors](./documentation/PUBLISHERS.md)\nFoundation of trikot.streams is based on a immutable and concurrent implementation of [Reactive-Streams](https://www.reactive-streams.org/).\n\n## [Cancellables](./documentation/CANCELLABLE.md)\nSubscription and unsubscription are managed trough `Cancellable` and `CancellableManager`.\n\n## Installation\n##### Import dependencies\n```groovy\n    maven { url('https://s3.amazonaws.com/mirego-maven/public') }\n\n    api \"com.mirego.trikot:streams:$trikot_streams_version\"\n    jvm \"com.mirego.trikot:streams-jvm:$trikot_streams_version\"\n    js \"com.mirego.trikot:streams-js:$trikot_streams_version\"\n    iosx64 \"com.mirego.trikot:streams-iosx64:$trikot_streams_version\"\n    iosarm64 \"com.mirego.trikot:streams-iosarm64:$trikot_streams_version\"\n```\n\n## License\n\nTrikot.streams is © 2018-2019 [Mirego](https://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the [`LICENSE.md`](https://github.com/mirego/trikot.streams/blob/master/LICENSE.md) file.\n\n## About Mirego\n\n[Mirego](https://www.mirego.com) is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of [talented people](https://life.mirego.com) who imagine and build beautiful Web and mobile applications. We come together to share ideas and [change the world](http://www.mirego.org).\n\nWe also [love open-source software](https://open.mirego.com) and we try to give back to the community as much as we can.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Ftrikot.streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirego%2Ftrikot.streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Ftrikot.streams/lists"}