{"id":16818555,"url":"https://github.com/robb/asterism","last_synced_at":"2025-04-07T12:10:13.580Z","repository":{"id":8810967,"uuid":"10507997","full_name":"robb/Asterism","owner":"robb","description":"Asterism is yet another functional toolbelt for Objective-C. It tries to be typesafe and simple.","archived":false,"fork":false,"pushed_at":"2022-06-24T14:04:22.000Z","size":444,"stargazers_count":226,"open_issues_count":8,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T11:03:39.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://robb.github.io/Asterism/","language":"Objective-C","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/robb.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"robb"}},"created_at":"2013-06-05T17:04:34.000Z","updated_at":"2024-04-02T17:41:17.000Z","dependencies_parsed_at":"2022-09-02T10:52:35.320Z","dependency_job_id":null,"html_url":"https://github.com/robb/Asterism","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robb%2FAsterism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robb%2FAsterism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robb%2FAsterism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robb%2FAsterism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robb","download_url":"https://codeload.github.com/robb/Asterism/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":"2024-10-13T10:50:28.845Z","updated_at":"2025-04-07T12:10:13.562Z","avatar_url":"https://github.com/robb.png","language":"Objective-C","funding_links":["https://github.com/sponsors/robb"],"categories":[],"sub_categories":[],"readme":"# Asterism ⁂\n\nAsterism is yet another functional toolbelt for Objective-C. It tries to be\ntypesafe and simple.\n\nUsing common higher-order functions such as `map`, `reduce` and `filter`,\nAsterism allows you to manipulate Foundation's data structures with ease.\n\nIt makes use of overloaded C-Functions to keep its interface simple while\nmaintaining compile-time safety. For instance, `ASTEach` takes different blocks\ndepending on the data structure it operates on:\n\n```objective-c\nASTEach(@[ @\"a\", @\"b\", @\"c\" ], ^(NSString *letter) {\n    NSLog(@\"%@\", letter);\n}];\n\nASTEach(@[ @\"a\", @\"b\", @\"c\" ], ^(NSString *letter, NSUInteger index) {\n    NSLog(@\"%u: %@\", index, letter);\n}];\n\nASTEach(@{ @\"foo\": @\"bar\" }, ^(NSString *key, NSString *value) {\n    NSLog(@\"%@: %@\", key, value);\n}];\n```\n\n[This page](http://robb.github.io/Asterism/) provides extensive documentation on\nall of Asterism's methods.\n\nAsterism was written by \u003ca href=\"http://robb.is\"\u003eRobert\nBöhnke\u003c/a\u003e and is \u003ca href=\"http://opensource.org/licenses/MIT\"\u003eMIT licensed\u003c/a\u003e.\n\n==============================\n\n## Getting Started\n\n### Using Carthage\nInstall [Carthage](https://github.com/Carthage/Carthage) if you don't have it. The easiest way is to use [HomeBrew](http://brew.sh):\n     `brew update`\n     `brew install carthage`\n      (or if you already have it installed) `brew upgrade carthage`\n\nCreate a [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#example-cartfile) at the root directory of your project and add the following to its contents...\n\n ```\n github 'robb/Asterism'\n ```\n\nRun Carthage...\n\n ```sh\n carthage update\n ```\n \n##### If you're building for OS X\n\nOn your application targets’ “General” settings tab, in the “Embedded Binaries” section, drag and drop the Asterism.framework from the `Carthage/Build/Mac` folder.\n\nAdditionally, you'll need to copy debug symbols for debugging and crash reporting on OS X.\n\n1. On your application target’s “Build Phases” settings tab, click the “+” icon and choose “New Copy Files Phase”.\n2. Click the “Destination” drop-down menu and select “Products Directory”.\n3. Now drag and drop the Asterism.framework's corresponding dSYM file.\n\n##### If you're building for iOS\n\nOn your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop the Asterism.framework from the `Carthage/Build/iOS` folder.\n\nOn your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: `bin/sh`), add the following contents to the script area below the shell:\n\n  ```\n  /usr/local/bin/carthage copy-frameworks\n  ```\n\n  and add the path to the Asterism.framework under “Input Files”, e.g.:\n\n  ```\n  $(SRCROOT)/Carthage/Build/iOS/Asterism.framework\n  ```\n  For a more detailed background of this script and it's intent, see the [Carthage readme](https://github.com/Carthage/Carthage/blob/master/README.md#if-youre-building-for-ios-tvos-or-watchos).\n  \n### Using CocoaPods\nFirst, update CocoaPods if you haven't in a while.\n\nThen, add Asterism to your Podfile. Be sure to include ```use_frameworks!```:\n\n```rb\n# Podfile\n\nuse_frameworks!\n\ntarget 'My-OSX-App' do\n    platform :osx, '10.9'\n    \n    pod 'Asterism'\nend\n\ntarget 'My-iOS-App' do\n    platform :iOS, '9.2'\n    \n    pod 'Asterism'\nend\n```\n\nFinally, tell CocoaPods to download and link Asterism in your project:\n\n```sh\npod install\n```\n\n### Using the Amalgamation header/source file pair\nCheckout this repo at the version you desire.\n\n```sh\nscript/gen_amalgamation.sh\n\ncp Amalgamation/* \u003cPathToYourProjectSourcesHere\u003e\n```\n\nAnd just add the `.m` file to the targets you desire and `#import \"Asterism.h\"` when you use it or in your `.pch`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobb%2Fasterism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobb%2Fasterism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobb%2Fasterism/lists"}