{"id":17689040,"url":"https://github.com/supermarcus/swiftyemoji","last_synced_at":"2026-03-08T17:33:44.824Z","repository":{"id":81700811,"uuid":"119188771","full_name":"SuperMarcus/swiftyemoji","owner":"SuperMarcus","description":"Emoji with Swift...or...Swift with Emojis","archived":false,"fork":false,"pushed_at":"2018-01-27T18:29:34.000Z","size":3,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T13:02:00.464Z","etag":null,"topics":["emojis","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/SuperMarcus.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-27T18:00:50.000Z","updated_at":"2024-12-08T17:06:07.000Z","dependencies_parsed_at":"2023-10-31T05:00:36.959Z","dependency_job_id":null,"html_url":"https://github.com/SuperMarcus/swiftyemoji","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/SuperMarcus%2Fswiftyemoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMarcus%2Fswiftyemoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMarcus%2Fswiftyemoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuperMarcus%2Fswiftyemoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuperMarcus","download_url":"https://codeload.github.com/SuperMarcus/swiftyemoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794565,"owners_count":21162613,"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":["emojis","swift"],"created_at":"2024-10-24T11:46:16.774Z","updated_at":"2026-03-08T17:33:43.682Z","avatar_url":"https://github.com/SuperMarcus.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"Swifty Emoji\n============\n\nAdd a few lines to your Swift project, start coding with emoji.\n\n## Swift + 🌚🌝 = Awesome\n\nEverybody loves emoji, and everybody loves swift. Swift is a powerful but serious language,\nwith emojis, it becomes funnier and cuter than ever.\n\n## Define your types\n\nBefore anything ever happens, we define the basic types in swift.\n\n### Bool\n\n```swift\ntypealias 👍👎 = Bool\n\n//Here we also define 'true' and 'false'\nlet 👍 = true\nlet 👎 = false\n```\n\n### Strings\n\n```swift\ntypealias 🔤 = String\ntypealias ℹ️🔤 = CustomStringConvertible\n```\n\n### Numbers\n\n```swift\ntypealias 🔢 = Int\ntypealias 🔢📶 = Double\n```\n\n## Convert Built-in Functions\n\nOnce we defined some necessary types, we can create some proxy functions like print\n\n```swift\n// Here I just used a closure calling the print function\nlet 🖨 = { (🛄: ℹ️🔤) in print(🛄) }\n```\n\n## Control Flows\n\nThis is the part where you'll have to use your brain. Here is my version of `if-else`\n\n```swift\n//First define a struct so we can implement `else`\nstruct 🌝🌚{\n    var 🌚: (() -\u003e ()) -\u003e ()\n}\n\n//Then we define the 'if' function\nfunc 🌝(_ 🛄👌: 👍👎, _ 🛄🌝: () -\u003e ()) -\u003e 🌝🌚 {\n    //Check if condition is true\n    if(🛄👌){\n        //If true, call the trailing closure\n        🛄🌝()\n        //Return 🌝🌚 with a closure that does nothing\n        return 🌝🌚(🌚: { _ in })\n    } else {\n        //Return 🌝🌚 with a closure that calls the parameter immedietly\n        return 🌝🌚(🌚: { 🛄 in 🛄() })\n    }\n}\n```\n\nThis results in something like:\n\n```swift\n🌝(👍){ 🖨(\"yes\") }\n.🌚{ 🖨(\"no\") }\n\n//prints: 'yes'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupermarcus%2Fswiftyemoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupermarcus%2Fswiftyemoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupermarcus%2Fswiftyemoji/lists"}