I hereby claim:
- I am foxfriends on github.
- I am cameldridge (https://keybase.io/cameldridge) on keybase.
- I have a public key ASAJbuKTod9nbNzGaX-u7LfUD4USig1CqKbYipuLVdgWzAo
To claim this, I am signing this object:
const PATH = Symbol('PATH'), DEREF = Symbol('DEREF'); | |
class Keypath extends Function { | |
constructor(...path) { | |
super(); | |
this[PATH] = path; | |
} | |
[DEREF](object) { | |
for (const key of this) { |
import { BehaviorSubject, Observable } from 'rxjs'; | |
import { map } from 'rxjs/operators'; | |
import { get, set } from 'shades'; | |
class Lens extends Observable { | |
#lens; | |
#source; | |
constructor(source, lens) { | |
if (!(source instanceof BehaviorSubject)) { |
export const Asc = Symbol('Asc'); | |
export const Desc = Symbol('Desc'); | |
/** | |
* @typedef {[string, direction, direction]} Order | |
* Describes a sorting step. The string is the key of the object, the first direction | |
* is the direction to sort values within the same type, and the second direction is | |
* the direction to sort values of different types. See {@see sort} for the default | |
* orderings. | |
*/ |
// MARK: - ConfigKey | |
protocol ConfigKey { | |
associatedtype Data | |
static var key: String { get } | |
} | |
// MARK: - Config | |
/// A type safe wrapper around Config.plist |
import Foundation | |
// MARK: - Storage Key | |
protocol StorageKey { | |
associatedtype V: Codable | |
static var key: String { get } | |
} | |
// MARK: - Storage |
I hereby claim:
To claim this, I am signing this object:
extension String { | |
/// Loads the localized version of the current string | |
@inline(__always) | |
func localized(comment: String = "") -> String { | |
return NSLocalizedString(self, comment: "") | |
} | |
/// Loads the localized version of the current string, interpolating the provided values into the string | |
func localized(comment: String = "", _ args: CVarArg...) -> String { | |
return withVaList(args) { |
/// Returns an iterator that generates symbols indefinitely. Names can be supplied. When names run out, then the | |
/// names are just the index | |
/// | |
/// # Usage | |
/// ```js | |
/// const [a, b, c, d, e] = Symbol.generate('a', 'b', 'c'); | |
/// ``` | |
Symbol.generate = function*(...names) { | |
let i = 0; | |
for (;;) |
import UIKit | |
// Usage: | |
// | |
// ``` | |
// UIFont.systemFont(ofSize: 14).usingFeatures([.tabularFigures]) | |
// ``` | |
// | |
extension UIFont { |