mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 16:21:00 +00:00
15 lines
312 B
Swift
15 lines
312 B
Swift
// 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"
|
|
}
|
|
}
|
|
|
|
extension URL: Identifiable {
|
|
public var id: String { absoluteString }
|
|
}
|