This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "1", | |
| "message": "A storm is coming. Let's get ready for it.", | |
| "status": 200 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| /** | |
| A broadcaster that allows multiple consumers to receive the same updates from a single source. | |
| Similar to `AsyncStream` but designed for multiple subscribers. | |
| Example usage | |
| ```swift | |
| final class AuthRepository { | |
| private let authStateStream = AsyncStreamBroadcast<AuthState>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // AsyncSVGImage.swift | |
| // AsyncSVGImage | |
| // | |
| // Created by Erez Hod on 1/21/24. | |
| // | |
| import Darwin | |
| import Foundation | |
| import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| enum UserDefaultsGroup: String { | |
| case standard | |
| case shared = "group.com.your.AppGroupName" // For sharing among App Groups | |
| } | |
| @propertyWrapper | |
| struct Persist<T: Codable> { | |
| struct Wrapper<T>: Codable where T: Codable { |