{"id":17091781,"url":"https://github.com/psharanda/jetpack","last_synced_at":"2025-04-12T22:41:10.967Z","repository":{"id":56916889,"uuid":"87738368","full_name":"psharanda/Jetpack","owner":"psharanda","description":"Light and bright functional reactive framework","archived":false,"fork":false,"pushed_at":"2020-04-23T13:51:08.000Z","size":350,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-14T19:53:39.668Z","etag":null,"topics":["functional","ios","observable","observer","reactive","rx","swift","unidirectional"],"latest_commit_sha":null,"homepage":"","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/psharanda.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-04-09T20:54:56.000Z","updated_at":"2024-01-12T09:37:43.000Z","dependencies_parsed_at":"2022-08-21T03:50:48.349Z","dependency_job_id":null,"html_url":"https://github.com/psharanda/Jetpack","commit_stats":null,"previous_names":[],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psharanda%2FJetpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psharanda%2FJetpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psharanda%2FJetpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psharanda%2FJetpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psharanda","download_url":"https://codeload.github.com/psharanda/Jetpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643045,"owners_count":21138353,"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":["functional","ios","observable","observer","reactive","rx","swift","unidirectional"],"created_at":"2024-10-14T13:59:30.630Z","updated_at":"2025-04-12T22:41:10.949Z","avatar_url":"https://github.com/psharanda.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jetpack\n\nJetpack is a lightweight reactive programming library for Swift. It provides tools for creating and composing asynchronous and event-based programs using observable sequences.\n\n## Features\n\n- Observable sequences\n- Mutable and immutable property wrappers\n- Combining and transforming observables \n- Threading and concurrency utilities\n- Array and 2D array reactive wrappers\n- Reactive subjects for broadcasting values\n\n\n## Usage\n\n```swift\nimport Jetpack\n\n// Create an observable sequence\nlet observable = Observable.just(5)\n\n// Subscribe to receive values\nobservable.subscribe { value in\n    print(value) // Prints: 5\n}\n\n// Create a mutable property\nlet property = MutableProperty(10)\n\n// Observe property changes\nproperty.subscribe { value in\n    print(value)\n}\n\nproperty.update(20) // Triggers subscription, prints: 20\n\n// Combine observables\nlet combined = observable.combineLatest(property.asObservable)\ncombined.subscribe { (a, b) in\n    print(\"Combined: \\(a), \\(b)\")\n}\n\n// Transform observables\nlet mapped = observable.map { $0 * 2 }\nmapped.subscribe { value in\n    print(value) // Prints: 10\n}\n```\n\n## Main Components\n\n- `Observable`: Represents a sequence of values over time\n- `Property`: Immutable wrapper around a value with reactive capabilities\n- `MutableProperty`: Mutable version of Property\n- `Subject`: Allows broadcasting values to multiple observers\n\n## Threading\n\nJetpack provides utilities for managing concurrency:\n\n```swift\nobservable.dispatch(on: .main) // Observe on main thread\nobservable.delay(timeInterval: 1.0, on: .global()) // Delay events\n```\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/username/Jetpack.git\", from: \"1.0.0\")\n]\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nJetpack is released under the MIT License. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsharanda%2Fjetpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsharanda%2Fjetpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsharanda%2Fjetpack/lists"}