This file contains 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 | |
extension UserDefaults { | |
struct Key { | |
typealias RawValue = String | |
let rawValue: RawValue | |
init(_ string: String) { | |
self.rawValue = string | |
} |
This file contains 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 UIKit | |
import Combine | |
final class ImageLoader { | |
typealias LoadPublisher = AnyPublisher<UIImage, Error> | |
typealias Cache = NSCache<CacheKey, UIImage> | |
private let loadImage: (URL, Cache) -> LoadPublisher | |
private let cachedImage: (URL, Cache) -> UIImage? |
OlderNewer