Skip to content

Instantly share code, notes, and snippets.

View n8chur's full-sized avatar
🏠
Working from home

Westin Newell n8chur

🏠
Working from home
View GitHub Profile
import Combine
// When wrapping a value, we take advantage of the setter
// to feed a PassthroughSubject
@propertyWrapper
struct Published<T> {
private var innerValue: T
private let innerSubject = PassthroughSubject<T, Never>()
@natecook1000
natecook1000 / NSScanner+Swift.swift
Created March 3, 2015 20:13
Swift-friendly NSScanner methods
// NSScanner+Swift.swift
// A set of Swift-idiomatic methods for NSScanner
//
// (c) 2015 Nate Cook, licensed under the MIT license
import Foundation
extension NSScanner {
// MARK: Strings