A small menubar app that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).
https://rud.is/rswitch
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
562 B
25 lines
562 B
//
|
|
// urls.swift
|
|
// RSwitch
|
|
//
|
|
// Created by hrbrmstr on 5/24/20.
|
|
// Copyright © 2020 Bob Rudis. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import Cocoa
|
|
import WebKit
|
|
|
|
extension URL {
|
|
var queryParameters: QueryParameters { return QueryParameters(url: self) }
|
|
}
|
|
|
|
class QueryParameters {
|
|
let queryItems: [URLQueryItem]
|
|
init(url: URL?) {
|
|
queryItems = URLComponents(string: url?.absoluteString ?? "")?.queryItems ?? []
|
|
}
|
|
subscript(name: String) -> String? {
|
|
return queryItems.first(where: { $0.name == name })?.value
|
|
}
|
|
}
|
|
|