{"id":21432300,"url":"https://github.com/electricbolt/corekit","last_synced_at":"2025-07-14T12:33:26.820Z","repository":{"id":143671596,"uuid":"181442340","full_name":"electricbolt/corekit","owner":"electricbolt","description":"Models, UI and other neat stuff for Swift apps","archived":false,"fork":false,"pushed_at":"2024-08-11T08:18:51.000Z","size":46,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T04:35:29.265Z","etag":null,"topics":["currency","ios","macos","money","string-manipulation","swift","swift-framework","watchos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electricbolt.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":"2019-04-15T08:14:52.000Z","updated_at":"2024-11-01T16:51:05.000Z","dependencies_parsed_at":"2023-05-15T21:30:52.401Z","dependency_job_id":null,"html_url":"https://github.com/electricbolt/corekit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fcorekit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fcorekit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fcorekit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electricbolt%2Fcorekit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electricbolt","download_url":"https://codeload.github.com/electricbolt/corekit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225976207,"owners_count":17554199,"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":["currency","ios","macos","money","string-manipulation","swift","swift-framework","watchos"],"created_at":"2024-11-22T23:18:02.568Z","updated_at":"2024-11-22T23:18:03.241Z","avatar_url":"https://github.com/electricbolt.png","language":"Swift","readme":"## CoreKit\n\nModels, UI and other neat stuff for Swift apps. Supports Swift 5.10, Xcode 15.4, iOS 13.0 and above.\n\n### Models\n\n#### Money \u0026 Currency\n\nA Money is an struct that represents an amount and an associated currency. Amounts either represent a real value\n (e.g. -$1927.10, ￥10, £1.56, 0.00kr.) or are unavailable (e.g. have no numerical value).\n\n\u003e Swift example\n\n```swift\nlet NZD = CurrencyManager.shared.get(code: \"NZD\")!\nvar m = Money(decimal: Decimal(40192.49), currency: NZD)\nm += Money(float: 5.0, currency: NZD)           // m is now 40197.49\nlet f = MoneyFormatter(currency: NZD)\nlet s = f.format(m)                             // s is now \"$40,197.49\"\n```\n\n### Extensions\n\n#### String\n\nExtensions to Swift's String struct to provide easier and safer access to substrings (at the expense of performance). Easier - no String.Index manipulation is required, indexes are specified using Int's. Safer - all bounds checking is\n performed before string manipulation, and therefore no possibility of generating an uncatchable fatal error can occur.\n\n\u003e Swift example\n\n```swift\nlet msg = \"My dog has fleas\"\nlet c: Character = msg[1]!                      // c is now \"y\"\nvar s: String = msg[4...]                       // s is now \"og has fleas\"\ns = msg[7...35]                                 // s is now \"has fleas\"\ns = msg.removeSuffix(\"fleas\")                   // s is now \"my dog has \"\n```\n\n#### Data\n\nExtensions to Swift's Data struct to provide Hex encoding and decoding. Coded for speed and between 6x to 34x faster than `map { String(format: \"%02hhx\", $0) }.joined()`\n\n\n\u003e Swift example\n\n```swift\nlet d = Data(hexEncoded: \"0fe3a9bc\")            // d is now 0x0f,0xe3,0xa9,0xbc\nlet s = d.hexEncodedString(options: .upperCase) // s is now \"0FE3A9BC\"\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbolt%2Fcorekit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectricbolt%2Fcorekit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectricbolt%2Fcorekit/lists"}