Skip to content

Instantly share code, notes, and snippets.

import Foundation
import HTTP
extension HTTPMethod: RawRepresentable {
// swiftlint:disable:next cyclomatic_complexity function_body_length
public init?(rawValue: String) {
switch rawValue.uppercased() {
case "GET":
self = .GET
@valeriomazzeo
valeriomazzeo / JSON.swift
Created May 18, 2020 10:20
A JSON data structure conforming to Codable
//
// JSON.swift
//
// Created by Valerio Mazzeo on 26/03/2018.
//
import Foundation
public enum JSON {
case object(JSON.Object)
/**
Relates to https://github.com/SwiftyBeaver/SwiftyBeaver/issues/340
*/
extension SwiftyBeaver {
@usableFromInline
static let queue = DispatchQueue(label: "com.asensei.asensei.SwiftyBeaver")
@discardableResult
class func ts_addDestination(_ destination: BaseDestination) -> Bool {