{"id":25195966,"url":"https://github.com/simplisticated/solid","last_synced_at":"2026-03-07T00:30:58.181Z","repository":{"id":62455798,"uuid":"45798913","full_name":"simplisticated/Solid","owner":"simplisticated","description":"New way to work with arrays in Swift.","archived":false,"fork":false,"pushed_at":"2018-06-08T00:13:07.000Z","size":99,"stargazers_count":35,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T02:25:50.243Z","etag":null,"topics":[],"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/simplisticated.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":"2015-11-08T21:01:22.000Z","updated_at":"2025-03-13T18:08:02.000Z","dependencies_parsed_at":"2022-11-02T00:01:26.776Z","dependency_job_id":null,"html_url":"https://github.com/simplisticated/Solid","commit_stats":null,"previous_names":["igormatyushkin014/solid"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/simplisticated/Solid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FSolid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FSolid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FSolid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FSolid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplisticated","download_url":"https://codeload.github.com/simplisticated/Solid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplisticated%2FSolid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278411261,"owners_count":25982368,"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-10-05T02:00:06.059Z","response_time":54,"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":[],"created_at":"2025-02-10T01:39:14.250Z","updated_at":"2025-10-05T05:18:56.511Z","avatar_url":"https://github.com/simplisticated.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" \u003e\n\u003cimg src=\"https://github.com/igormatyushkin014/Solid/blob/master/Logo/logo-1024-300.png\" alt=\"Solid\" title=\"Solid\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://swift.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/Solid.svg?maxAge=2592000\"\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/dt/Solid.svg?maxAge=2592000\"\u003e\u003c/a\u003e\n\u003ca href=\"https://tldrlegal.com/license/mit-license\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## At a Glance\n\nThe main purpose of this library is to make selections from arrays in Swift more clear and efficient.\n\n## How To Get Started\n\n- Copy content of `Solid` folder to your project.\n\nor\n\n- Use `Solid` cocoapod\n\n## Requirements\n\n* iOS 9.0 and later\n* Xcode 8 and later\n\n**Note**: For Swift 2.x use `Solid v1.2.3`. For Swift 3.0 use `Solid v3.0`.\n\n## Usage\n\n```swift\nlet sourceArray = [1, 5, 10, 128, 256, 1024, 2048, 4096, 8000, 8390]\n\nlet selection1 = (sourceArray as NSArray)\n    .beginQuery()    // Each query should begin with this call\n\n    .skip(2)         // Removes first two elements from result selection\n                     // Temporary result: [10, 128, 256, 1024, 2048, 4096, 8000, 8390]\n\n    .take(3)         // Removes all elements but first three from result selection\n                     // Temporary result: [10, 128, 256]\n\n    .endQuery()      // This method returns result of selection\n                     // In current case, result is an array equal to [10, 128, 256]\n\n\nlet selection2 = (sourceArray as NSArray)\n    .beginQuery()\n    .skip(4)         // Temporary result: [256, 1024, 2048, 4096, 8000, 8390]\n    .take(2)         // Temporary result: [256, 1024]\n    .contains({\n        // Checks whether at least one element is more than 300\n        ($0 as! Int) \u003e 300\n    })\n    .endQuery()      // Returns boolean value equal to true\n\n\n/*\n * Let's assume we want to check whether\n * all elements of array are bigger than 20\n */\n\nlet selection3 = (sourceArray as NSArray)\n    .beginQuery()\n    .all({\n        ($0 as! Int) \u003e 20\n    })\n    .endQuery()    // Returns true\n\n\n/*\n * Another case showing\n * how you can process data in the array.\n */\n\nlet selection4 = (sourceArray as NSArray)\n    .beginQuery()\n    .filter({\n        // Selects all elements that are bigger than 200\n        ($0 as! Int) \u003e 200\n    })\n    .obtain({\n        // Multiply each number in array by 2 times\n        ($0 as! Int) * 2\n    })\n    .sort({\n        // Sort in descending order\n        ($0 as! Int) \u003e ($1 as! Int)\n    })\n    .endQuery()    // Returns [16780, 16000, 8192, 4096, 2048, 512]\n\n\n/*\n * You can also select first or last value from the array.\n */\n\nlet selection5 = (sourceArray as NSArray)\n    .beginQuery()\n    .first()\n    .endQuery()\n\nlet selection6 = (sourceArray as NSArray)\n    .beginQuery()\n    .last()\n    .endQuery()\n\n\n/*\n * Also it's possible to cast result array to required type.\n */\n\nlet selection7 = (sourceArray as NSArray)\n    .beginQuery()\n    .cast(NSNumber.self)\n    .endQuery()\n```\n\n## License\n\n`Solid` is available under the MIT license. See the `LICENSE` file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Fsolid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplisticated%2Fsolid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplisticated%2Fsolid/lists"}