{"id":24124688,"url":"https://github.com/devteam/rx","last_synced_at":"2025-02-28T22:39:00.974Z","repository":{"id":79429408,"uuid":"139124957","full_name":"DevTeam/rx","owner":"DevTeam","description":"reactive extensions rx kotlin","archived":false,"fork":false,"pushed_at":"2024-01-29T14:00:03.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:35:40.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevTeam.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-29T08:46:00.000Z","updated_at":"2024-01-29T14:00:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"5392bc4e-57ed-4484-ae49-711237a102aa","html_url":"https://github.com/DevTeam/rx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevTeam%2Frx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevTeam%2Frx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevTeam%2Frx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevTeam%2Frx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevTeam","download_url":"https://codeload.github.com/DevTeam/rx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241261027,"owners_count":19935953,"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":"2025-01-11T14:35:36.153Z","updated_at":"2025-02-28T22:39:00.951Z","avatar_url":"https://github.com/DevTeam.png","language":"Kotlin","readme":"# Reactive Extensions for Kotlin\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [\u003cimg src=\"http://tcavs2015.cloudapp.net/app/rest/builds/buildType:(id:DevTeam_Rx_Build)/statusIcon\"/\u003e](http://tcavs2015.cloudapp.net/viewType.html?buildTypeId=DevTeam_Rx_Build\u0026guest=1)\n\n## Download\n\n  * [Stable version](http://tcavs2015.cloudapp.net/guestAuth/app/rest/builds/buildType:DevTeam_Rx_Build,pinned:true,status:SUCCESS,tags:release/artifacts/content/rx-1.0-SNAPSHOT.jar)\n  * [Nightly build](http://tcavs2015.cloudapp.net/guestAuth/app/rest/builds/buildType:DevTeam_Rx_Build,status:SUCCESS/artifacts/content/rx-1.0-SNAPSHOT.jar)\n  \n## Examples\n\n``` Koltin\nclass Examples {\n    @Test\n    fun buildObservable() {\n        val observable = buildObservable\u003cInt\u003e {\n            onNext(1)\n            onNext(2)\n            onNext(3)\n            onCompleted()\n            emptyDisposable()\n        }\n\n        assertEquals(observable, observableOf(1, 2, 3))\n    }\n\n    @Test\n    fun subscribe() {\n        val actual = mutableListOf\u003cInt\u003e()\n        source.subscribe { actual.add(it) }.use {\n            Assert.assertEquals(actual, listOf(1, 2, 3))\n        }\n    }\n\n    @Test\n    fun map() {\n        val actual = source.map { it.toString() }\n\n        assertEquals(actual, observableOf(\"1\", \"2\", \"3\"))\n    }\n\n    @Test\n    fun reduce() {\n        val actual = source.reduce(0) { total, next -\u003e total + next}\n\n        assertEquals(actual, observableOf(6))\n    }\n\n    @Test\n    fun filter() {\n        val actual = source.filter { it != 2 }\n\n        assertEquals(actual, observableOf(1, 3))\n    }\n\n    @Test\n    fun until() {\n        val actual = source.until { it != 2 }\n\n        assertEquals(actual, observableOf(1))\n    }\n\n    @Test\n    fun take() {\n        val actual = source.take(0 .. 1)\n\n        assertEquals(actual, observableOf(1, 2))\n    }\n\n    @Test\n    fun first() {\n        val actual = source.first()\n\n        assertEquals(actual, observableOf(1))\n    }\n\n    @Test\n    fun last() {\n        val actual = source.last()\n\n        assertEquals(actual, observableOf(3))\n    }\n\n    @Test\n    fun count() {\n        val actual = source.count()\n\n        assertEquals(actual, observableOf(3L))\n    }\n\n    @Test\n    fun toSequence() {\n        val actual = source.toSequence(0)\n\n        Assert.assertEquals(actual.toList(), listOf(1, 2, 3))\n    }\n\n    companion object {\n        private val source = buildObservable\u003cInt\u003e {\n            onNext(1)\n            onNext(2)\n            onNext(3)\n            onCompleted()\n            emptyDisposable()\n        }\n    }\n}\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteam%2Frx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevteam%2Frx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevteam%2Frx/lists"}