{"id":16853145,"url":"https://github.com/devxoul/safecollection","last_synced_at":"2025-07-16T20:36:28.526Z","repository":{"id":56922035,"uuid":"51994177","full_name":"devxoul/SafeCollection","owner":"devxoul","description":"Safe Collection for Swift","archived":false,"fork":false,"pushed_at":"2019-04-03T13:03:50.000Z","size":27,"stargazers_count":42,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T00:41:02.070Z","etag":null,"topics":["array","optional","subscript","swift"],"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/devxoul.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":"2016-02-18T09:02:36.000Z","updated_at":"2025-04-04T18:38:11.000Z","dependencies_parsed_at":"2022-08-21T04:50:14.318Z","dependency_job_id":null,"html_url":"https://github.com/devxoul/SafeCollection","commit_stats":null,"previous_names":["devxoul/safeindex"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/devxoul/SafeCollection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSafeCollection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSafeCollection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSafeCollection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSafeCollection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devxoul","download_url":"https://codeload.github.com/devxoul/SafeCollection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FSafeCollection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265538722,"owners_count":23784642,"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":["array","optional","subscript","swift"],"created_at":"2024-10-13T13:49:54.842Z","updated_at":"2025-07-16T20:36:28.496Z","avatar_url":"https://github.com/devxoul.png","language":"Swift","readme":"# SafeCollection\n\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![Build Status](https://travis-ci.org/devxoul/SafeCollection.svg)](https://travis-ci.org/devxoul/SafeCollection)\n[![CocoaPods](http://img.shields.io/cocoapods/v/SafeCollection.svg)](https://cocoapods.org/pods/SafeCollection)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nSafeCollection provides a safer way to deal with subscripts. Inspired by Swift's [LazyCollection](https://developer.apple.com/documentation/swift/lazycollection).\n\n## At a Glance\n\n```swift\nlet arr = [\"A\", \"B\", \"C\"]\n\narr[0]    // \"A\"\narr[100]  // fatal error: Array index out of range 😟\n\narr.safe[0]   // Optional(\"A\")\narr.safe[100] // nil 😄\n```\n\n## Installation\n\n- **For iOS 8+ projects** with [CocoaPods](https://cocoapods.org):\n\n    ```ruby\n    pod 'SafeCollection'\n    ```\n\n- **For iOS 8+ projects** with [Carthage](https://github.com/Carthage/Carthage):\n\n    ```\n    github \"devxoul/SafeCollection\"\n    ```\n\n- **Using [Swift Package Manager](https://swift.org/package-manager)**:\n\n    ```swift\n    import PackageDescription\n\n    let package = Package(\n      name: \"MyAwesomeApp\",\n      dependencies: [\n        .package(url: \"https://github.com/devxoul/SafeCollection\", .upToNextMajor(from: \"3.0.0\")),\n      ]\n    )\n    ```\n\n## License\n\nSafeCollection is under MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fsafecollection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxoul%2Fsafecollection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Fsafecollection/lists"}