mirror of
https://github.com/mas-cli/mas
synced 2024-11-26 05:20:18 +00:00
15 lines
278 B
Swift
15 lines
278 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 {
|
|
self[key] as? String ?? ""
|
|
}
|
|
}
|