mas/MasKit/Extensions/Dictionary+StringOrEmpty.swift
2019-01-07 17:36:14 -07:00

15 lines
285 B
Swift

//
// Dictionary+StringOrEmpty.swift
// MasKit
//
// Created by Ben Chatelain on 1/7/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
import Foundation
extension Dictionary {
func stringOrEmpty(key: Key) -> String {
return self[key] as? String ?? ""
}
}