mirror of
https://github.com/mas-cli/mas
synced 2024-12-23 02:13:09 +00:00
15 lines
285 B
Swift
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 ?? ""
|
|
}
|
|
}
|