{"id":30307238,"url":"https://github.com/musichin/reactivelivedata","last_synced_at":"2025-08-17T10:44:28.870Z","repository":{"id":27535068,"uuid":"110023553","full_name":"musichin/ReactiveLiveData","owner":"musichin","description":"Transformation functions for LiveData","archived":false,"fork":false,"pushed_at":"2023-12-01T11:34:20.000Z","size":541,"stargazers_count":78,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T10:44:27.532Z","etag":null,"topics":["android","android-library","androidx","architecture-components","java","kotlin","livedata","transform-functions"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/musichin.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":"2017-11-08T19:54:16.000Z","updated_at":"2025-03-21T06:53:09.000Z","dependencies_parsed_at":"2023-02-17T18:45:28.631Z","dependency_job_id":null,"html_url":"https://github.com/musichin/ReactiveLiveData","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/musichin/ReactiveLiveData","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musichin%2FReactiveLiveData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musichin%2FReactiveLiveData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musichin%2FReactiveLiveData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musichin%2FReactiveLiveData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/musichin","download_url":"https://codeload.github.com/musichin/ReactiveLiveData/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/musichin%2FReactiveLiveData/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270837450,"owners_count":24654386,"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-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["android","android-library","androidx","architecture-components","java","kotlin","livedata","transform-functions"],"created_at":"2025-08-17T10:44:27.059Z","updated_at":"2025-08-17T10:44:28.845Z","avatar_url":"https://github.com/musichin.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reactive LiveData\n[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.10-blue.svg)](http://kotlinlang.org)\n[![CI](https://github.com/musichin/ReactiveLiveData/actions/workflows/ci.yml/badge.svg)](https://github.com/musichin/ReactiveLiveData/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/musichin/ReactiveLiveData/branch/main/graph/badge.svg?token=6M3tKXUbf3)](https://codecov.io/gh/musichin/ReactiveLiveData)\n[![Maven Central](https://img.shields.io/maven-central/v/de.musichin.reactivelivedata/reactivelivedata)](https://search.maven.org/artifact/de.musichin.reactivelivedata/reactivelivedata)\n\nThis library provides basic transformation functions for your [`LiveData`](https://developer.android.com/topic/libraries/architecture/livedata.html) objects.\n\n## Functions\n* `map`\n* `switchMap`\n* `switchLatest`\n* `filter`\n* `filterNotNull`\n* `distinct`\n* `distinctUntilChanged`\n* `merge`\n* `combineLatest`\n* `startWith`\n* `first`\n* `take`\n* `takeUntil`\n* `takeWhile`\n* `buffer`\n* `cast`\n* and more...\n\n## Usage\n\n### `filter`\n```kotlin\nval source: LiveData\u003cInt\u003e = // 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nsource.filter { it % 2 == 1 }.observe(this) {\n    println(it) // 1, 3, 5, 7, 9\n}\n```\n\n### `distinct`\n```kotlin\nval source: LiveData\u003cInt\u003e = // 1, 2, 1, 3, 2, 4, 1, 3, 2, 5\nsource.distinct().observe(this) {\n    println(it) // 1, 2, 3, 4, 5\n}\n```\n\n### `merge`\n```kotlin\nval source1: LiveData\u003cString\u003e = // 1,    2,    3,\nval source2: LiveData\u003cInt\u003e = // a,    b,    c,\nlistOf(source1, source2).merge().observe(this) { value -\u003e\n    println(value) // a, 1, b, 2, c, 3\n}\n```\n\n## Binaries\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'de.musichin.reactivelivedata:reactivelivedata:x.y.z'\n}\n```\n\n## Contributing\nContributors are more than welcome. Just upload a PR with a description of your changes.\n\n## Issues or feature requests?\nFile github issues for anything that is unexpectedly broken.\n\n## License\n\n    MIT License\n\n    Copyright (c) 2017 Anton Musichin\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmusichin%2Freactivelivedata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmusichin%2Freactivelivedata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmusichin%2Freactivelivedata/lists"}