Skip to content

Instantly share code, notes, and snippets.

View borisdipner's full-sized avatar
🚀
Up Up Up

B Ꮎ Ꮢ I S⠀D I P N Ξ Ꮢ borisdipner

🚀
Up Up Up
View GitHub Profile
import Foundation
extension Bundle {
func decode<T: Decodable>(_ type: T.Type,
from file: String,
dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate,
keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys) -> T {
guard let url = self.url(forResource: file, withExtension: nil) else {