metatext/Extensions/URL+Extensions.swift

16 lines
312 B
Swift
Raw Normal View History

2020-09-12 02:50:42 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
extension URL {
var isHTTPURL: Bool {
guard let scheme = scheme else { return false }
return scheme == "http" || scheme == "https"
}
}
2020-09-12 02:50:42 +00:00
extension URL: Identifiable {
public var id: String { absoluteString }
}