Swiftpack.co - Swift Packages by 0xLet

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by 0xLet

0xLet/SwiftUIKit 3.0.1
📱 UIKit code that is fun to write
⭐️ 74
🕓 2 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
3.0.1
2 years ago
# 3.0.1 ## Updated - [[email protected]](https://github.com/0xLeif/DataObject) # 3.0.0 ## Added - Better formatting - Basic Documentation (WIP) ## 📦 SPM - Removed [Later](https://github.com/0xLeif/Later) - Added [Observation](https://github.com/0xLeif/Observation) - Added [DataObject](https://github.com/0xLeif/DataObject) ## Updated - `configure` to use [`SwiftFu.configure`](https://github.com/0xLeif/SwiftFu) - `contract` to `observed` - `UIView.later` to `UIView.chain` and `UIView.background` - `ContractView` to `ObservedView` - Some Parameter names
3.0.0
3 years ago
# 3.0.0 ## Added - Better formatting - Basic Documentation (WIP) ## 📦 SPM - Removed [Later](https://github.com/0xLeif/Later) - Added [Observation](https://github.com/0xLeif/Observation) - Added [DataObject](https://github.com/0xLeif/DataObject) ## Updated - `configure` to use [`SwiftFu.configure`](https://github.com/0xLeif/SwiftFu) - `contract` to `observed` - `UIView.later` to `UIView.chain` and `UIView.background` - `ContractView` to `ObservedView` - Some Parameter names
Default ContractView
3 years ago
```swift var contractView: ContractView<UIView, Int> = ContractView { contractView in Contract(initialValue: 0) .onChange { (value) in print("New Value: \(String(describing: value))") Later.main { // Update UI } } } ```
V+H Scroll
3 years ago
## Example ```swift VScroll { VStack { [ /* Views to scroll */ ] } } ```
Later Resign Contract
3 years ago
SwiftUIKit+Later
3 years ago
- [Added Later and ContractView](https://github.com/0xLeif/SwiftUIKit/pull/163) - [Added UIView.later](https://github.com/0xLeif/SwiftUIKit/pull/164) _(Built with Xcode 11.6)_ ## Demos ### [Contract Demo](https://github.com/0xLeif/Contract-UI-Demo) ### [UIView.later Demo](https://github.com/0xLeif/LaterView)
SwiftUIKit v1.3.0
3 years ago
# Updates - [Add modifier for ContentHuggingPriority](https://github.com/0xLeif/SwiftUIKit/issues/159) - [Add section header and footer height for TableView](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/4d52b41e8bdf0707d39d50aeecb7732d8a0d54e7) - [Add LoadingImage error handler](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/74826ccf06ab4cbccd74bb2bdf915445da617ebb) - [Update button styling and padding](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/0ca6901f0dcc14f5bcac3411af18179733c2b087) - [Default to the system colors for dark/ light](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/b64c80584a5325c610b36aafe0c51d4e0472c04c) - [Add center anchor constraints](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/a51898f9c92a7b57a37073fa57b234b7cedf29e5) - [Added misc modifiers](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/9b001339b738441e06e77272e3f5b00a6fc2db73) - [Animate modifiers, hidden, appear, and animate](https://github.com/0xLeif/SwiftUIKit/pull/162/commits/f607f274f58dcce50be289f31db20c76820ad219)
1.2.0
3 years ago
# SwiftUIKit v1.2.0 ## Updates - [Map](https://github.com/0xLeif/SwiftUIKit/blob/master/Sources/SwiftUIKit/Views/Map.swift) - [CollectionView](https://github.com/0xLeif/SwiftUIKit/blob/master/Sources/SwiftUIKit/Views/CollectionView.swift) - [ContainerView](https://github.com/0xLeif/SwiftUIKit/blob/master/Sources/SwiftUIKit/Views/ContainerView.swift) - [TableView](https://github.com/0xLeif/SwiftUIKit/blob/master/Sources/SwiftUIKit/Views/TableView.swift) - Table has been changed to [List](https://github.com/0xLeif/SwiftUIKit/blob/master/Sources/SwiftUIKit/Views/List.swift) ### Completed Issues - [Allow Table to handle editing and deleting #135](https://github.com/0xLeif/SwiftUIKit/issues/135) - [Rename "DataConfigurable" to "DataIdentifiable" #147](https://github.com/0xLeif/SwiftUIKit/issues/147) - [Rename "Table" to "List" #146](https://github.com/0xLeif/SwiftUIKit/issues/146) - [Helper Function to see if Constraints are connected #144](https://github.com/0xLeif/SwiftUIKit/issues/144) - [UIView+SwiftUIKit.swift Navigate BarButton functions don't use animated parameter #148](https://github.com/0xLeif/SwiftUIKit/issues/148) - [TableView should default to true for shouldHighlightRowAtIndexPath #153 by @ciccioska](https://github.com/0xLeif/SwiftUIKit/issues/153) - [Quick Access to Constraints #143](https://github.com/0xLeif/SwiftUIKit/issues/143) - [Container View #142](https://github.com/0xLeif/SwiftUIKit/issues/142) - [Ability to update set padding #137](https://github.com/0xLeif/SwiftUIKit/issues/137) - [Slider should set the value after it sets the min and max #136](https://github.com/0xLeif/SwiftUIKit/issues/136) - [Allow Table to handle editing and deleting #135](https://github.com/0xLeif/SwiftUIKit/issues/135)
4 years ago
# SwiftUIKit v1.1.0 ## Updates - TableView - Layer Modifiers - Different Padding - Fixed Bugs
Xcode 10.3 Legacy Build of v1.0.0
4 years ago
# Xcode 10.3 Support for [v1.0.0](https://github.com/zmeriksen/SwiftUIKit/releases/tag/1.0.0)
0xLet/MetalUI 0.1.0
🤘 Metal with SwiftUI
⭐️ 45
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Rendering & Presenting
3 years ago
## [MetalView](https://github.com/0xLeif/MetalUI/blob/main/Sources/MetalUI/SwiftUI/MetalView.swift) ```swift #if os(iOS) public struct MetalView<Content>: UIViewRepresentable where Content: MetalPresenting #elseif os(macOS) public struct MetalView<Content>: NSViewRepresentable where Content: MetalPresenting #endif ``` ## [Rendering](https://github.com/0xLeif/MetalUI/blob/main/Sources/MetalUI/MTKViewDelegate/MetalRendering.swift) ```swift public protocol MetalRendering: NSObject, MTKViewDelegate { var commandQueue: MTLCommandQueue? { get set } var renderPipelineState: MTLRenderPipelineState? { get set } var vertexBuffer: MTLBuffer? { get set } var vertices: [MetalRenderingVertex] { get set } init() init( vertices: [MetalRenderingVertex], device: MTLDevice ) func createCommandQueue(device: MTLDevice) func createPipelineState( withLibrary library: MTLLibrary?, forDevice device: MTLDevice ) func createBuffers(device: MTLDevice) // MARK: MTKViewDelegate func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) func draw(in view: MTKView) } ``` ## [Presenting](https://github.com/0xLeif/MetalUI/blob/main/Sources/MetalUI/MTKView/MetalPresenting.swift) ```swift public protocol MetalPresenting: MTKView { var renderer: MetalRendering! { get set } init() func configure(device: MTLDevice?) func configureMTKView() func renderer(forDevice device: MTLDevice) -> MetalRendering } ```
iOS macOS
0xLet/SwiftFu 1.0.1
➕ Swift Function Upgrades
⭐️ 12
🕓 2 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.0.1
2 years ago
## Protocols ### [Assertable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Assertable.swift) ### [Boolable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Boolable.swift) ### [Configurable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Configurable.swift) ### [Functionable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Functionable.swift) ### [Modifiable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Modifiable.swift) ### [Printable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Printable.swift) ### [Tuplable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Tuplable.swift) ## Functions ### [switchmap](https://github.com/0xLet/SwiftFu/blob/c92aa02dc56c0370cdc989881fa5873b00f5f756/Sources/SwiftFu/Switch%2B.swift#L10-L83) ### [switcheffect](https://github.com/0xLet/SwiftFu/blob/c92aa02dc56c0370cdc989881fa5873b00f5f756/Sources/SwiftFu/Switch%2B.swift#L85-L103) ## Math ### [BinaryFloatingPoint](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Numbers/BinaryFloatingPoint%2B.swift) ### [BinaryInteger](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Numbers/BinaryInteger%2B.swift) ## Optional `func replace(nilWith value: Wrapped) -> Wrapped` ## Fuable ```swift public protocol Fuable: Printable, Modifiable, Boolable, Functionable, Tuplable, Assertable { } public protocol FuableClass: Fuable, Configurable { } ``` ## Swift + SwiftFu ```swift extension Optional: Fuable { } extension String: Fuable { } extension Character: Fuable { } extension Int: Fuable { } extension Double: Fuable { } extension Float: Fuable { } extension Bool: Fuable { } extension Array: Fuable { } extension Dictionary: Fuable { } extension Set: Fuable { } ``` ## Foundation + SwiftFu ```swift extension Data: Fuable { } extension Date: Fuable { } extension URL: Fuable { } extension URLRequest: Fuable { } extension NSObject: FuableClass { } ```
1.0.0
2 years ago
## Protocols ### [Assertable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Assertable.swift) ### [Boolable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Boolable.swift) ### [Configurable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Configurable.swift) ### [Functionable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Functionable.swift) ### [Modifiable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Modifiable.swift) ### [Printable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Printable.swift) ### [Tuplable](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Protocols/Tuplable.swift) ## Functions ### [switchmap](https://github.com/0xLet/SwiftFu/blob/c92aa02dc56c0370cdc989881fa5873b00f5f756/Sources/SwiftFu/Switch%2B.swift#L10-L83) ### [switcheffect](https://github.com/0xLet/SwiftFu/blob/c92aa02dc56c0370cdc989881fa5873b00f5f756/Sources/SwiftFu/Switch%2B.swift#L85-L103) ## Math ### [BinaryFloatingPoint](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Numbers/BinaryFloatingPoint%2B.swift) ### [BinaryInteger](https://github.com/0xLet/SwiftFu/blob/1.0.0/Sources/SwiftFu/Numbers/BinaryInteger%2B.swift) ## Optional `func replace(nilWith value: Wrapped) -> Wrapped` ## Fuable ```swift public protocol Fuable: Printable, Modifiable, Boolable, Functionable, Tuplable, Assertable { } public protocol FuableClass: Fuable, Configurable { } ``` ## Swift + SwiftFu ```swift extension Optional: Fuable { } extension String: Fuable { } extension Character: Fuable { } extension Int: Fuable { } extension Double: Fuable { } extension Float: Fuable { } extension Bool: Fuable { } extension Array: Fuable { } extension Dictionary: Fuable { } extension Set: Fuable { } ``` ## Foundation + SwiftFu ```swift extension Data: Fuable { } extension Date: Fuable { } extension URL: Fuable { } extension URLRequest: Fuable { } extension NSObject: FuableClass { } ```
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0xLet/E.num 0.3.0
🟠 Swift Enum Lang
⭐️ 10
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Variable.array([...]).flatten
3 years ago
## Unflattened Variable Output ```swift (lldb) po output ▿ Variable ▿ array : 2 elements ▿ 0 : Variable - string : "First" ▿ 1 : Variable ▿ array : 2 elements - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable ▿ array : 3 elements ▿ 0 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 2 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable - string : "Link" ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable - string : "Last" ▿ 1 : Variable ▿ array : 1 element ▿ 0 : Variable - string : "Last !!!" ``` ## Flattened Variable Output ```swift (lldb) po output.flatten ▿ Variable ▿ array : 8 elements ▿ 0 : Variable - string : "First" - 1 : E.Variable.void - 2 : E.Variable.void - 3 : E.Variable.void - 4 : E.Variable.void ▿ 5 : Variable - string : "Link" ▿ 6 : Variable - string : "Last" ▿ 7 : Variable - string : "Last !!!" ```
Simple State
3 years ago
# Simple State ## enum State ```swift public indirect enum State { case cyclic(action: StateAction, to: State, while: () -> Bool) case some(with: StateResult) case transition(to: State, with: StateResult) } ``` ## enum StateResult ```swift public indirect enum StateResult { case none case transition(State) case some(action: StateAction) case condition(true: StateResult, false: StateResult, statement: () -> Bool) } ``` ## enum StateAction ```swift public enum StateAction { case none case some(Function) } ``` # Examples ## Retry Login ```swift let loggedOut = State.some(with: .some(action: .some(.void({ print("Logged Out") XCTAssert(false) })))) let loggedIn = State.some(with: .some(action: .some(.void({ print("Logged In") XCTAssert(true) })))) let attemptLogin = State.some(with: .condition(true: .transition(loggedIn), false: .transition(loggedOut), statement: { () -> Bool in print("Attempting to login without retry...") sleep(3) return true })) let loginFailed = State.transition(to: attemptLogin, with: .some(action: .some(.void({ print("Login Failed!") })))) let attemptRetryLogin = State.some(with: .condition(true: .transition(loggedIn), false: .transition(loginFailed), statement: { () -> Bool in print("Attempting to login with retry...") sleep(3) return false })) attemptRetryLogin.run() ``` ## Cyclic ```swift var value: Variable = .int(0) let maxValue: Variable = .int(256) let incValue: Function = .void { value = value.update { .int($0 + 1) } } let boolFunc: Function = .out { .bool(value.value() ?? 0 < maxValue.value() ?? 0) } let finState = State.some(with: .some(action: .some(.void({ print("DONE!") XCTAssert(true) })))) let cyclicState = State.cyclic(action: .some(incValue), to: finState) { boolFunc()?.value() ?? false } XCTAssertEqual(value.value(), 0) cyclicState.run() XCTAssertEqual(value.value(), 256) ```
import E
3 years ago
Switched E.num to E for a simple import. ```swift import E ```
Control
3 years ago
## Controls ```swift case `if`(Bool, Function) case `else`(Bool, Function) case ifElse(Bool, Function, Function) case loop(ClosedRange<Int>, Function) case forEach([Variable], Function) case forever(Function) ``` ## Variables ```swift /// Update the Variable's Value /// - Returns: A new Variable with the type of T func update<T>(_ closure: (T) -> Variable) -> Self /// Modify the Variable to be any type of Variable /// - Returns: A new Variable of any type func modify<T>(_ closure: (T?) -> Variable) -> Self func value<T>(as type: T.Type? = nil) -> T? ``` ## Example ```swift var count: Variable = .int(0) let stillIntValue = count .update { .string($0 ?? "Hello, World!") } // returns .int(0) .update { .int($0 + 27) } let defaultedStringValue = count.modify { value in .string(value ?? "Hello, World!") } XCTAssertEqual(count, 0) XCTAssertEqual(stillIntValue, 27) XCTAssertEqual(defaultedStringValue, "Hello, World!") Control.loop(0 ... 5, .in { index in count = count.update { value in .int(value + (index.value() ?? 0)) } }) .run() XCTAssertEqual(count, 15) ```
ExpressibleByLiteral
3 years ago
## Literals ```swift extension Variable: ExpressibleByBooleanLiteral { ... } extension Variable: ExpressibleByIntegerLiteral { ... } extension Variable: ExpressibleByFloatLiteral { ... } extension Variable: ExpressibleByStringLiteral { ... } extension Variable: ExpressibleByArrayLiteral { ... } extension Variable: ExpressibleByDictionaryLiteral { ... } ``` ## Example ```swift let text: Variable = "Hello, World!" XCTAssertEqual(text, "Hello, World!") ```
Variables and Functions
3 years ago
## Variables ```swift case void case bool(Bool) case int(Int) case float(Float) case double(Double) case string(String) case set(Set<Variable>) case array([Variable]) case dictionary([Variable: Variable]) ``` ### Variable Example ```swift let text: Variable = .string("Hello, World!") let list: Variable = .array( [ .bool(false), .string("False"), .int(27) ] ) // ... if case .string(let value) = text { print("String: \(value)") } if case .array(let value) = list, let lastValue = value.last, case .int(let number) = lastValue { print(number * 99) } ``` ## Functions ```swift case void(() -> ()) case `in`((Variable) -> ()) case out(() -> Variable) case `inout`((Variable) -> Variable) ``` ### Function Example ```swift let printString = Function.in { stringValue in guard case .string(let value) = stringValue else { return } print(value) } // ... printString(.string("Hello, World...")) ```
0xLet/DataObject 1.1.1
📦 DataObject(Any)
⭐️ 3
🕓 2 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.1.1
2 years ago
# DataObject *DataObject(Any)* ## Basic Example ```swift let obj = DataObject("init_value") .set(variable: "SomeValue", value: "qwerty") .set(variable: "nil", value: nil) XCTAssertEqual(obj.value(), "init_value") XCTAssertEqual(obj.SomeValue.value(), "qwerty") XCTAssertEqual(obj.nil, DataObject()) ``` ## [SURL](https://github.com/0xLeif/SURL) JSON Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.variables.keys) // [AnyHashable("response"), AnyHashable("data")] print(obj.data) } ``` <details> <summary>JSON</summary> ```json { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } ``` </details> ### Output: obj.data ```swift DataObject { | Variables | * id: 7 (__NSCFNumber) | * value: 500 bytes (Data) | * address: { city = Howemouth; geo = { lat = "24.8918"; lng = "21.8984"; }; street = "Rex Trail"; suite = "Suite 280"; zipcode = "58804-1099"; } (__NSDictionaryI) | * email: [email protected] (__NSCFString) | * json: { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } (String) | * website: elvis.io (NSTaggedPointerString) | * username: Elwyn.Skiles (__NSCFString) | * company: { bs = "generate enterprise e-tailers"; catchPhrase = "Configurable multimedia task-force"; name = "Johns Group"; } (__NSDictionaryI) | * phone: 210.067.6132 (__NSCFString) | * name: Kurtis Weissnat (__NSCFString) } ``` ## [WTV](https://github.com/0xLeif/WTV) Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.data.wtv(named: "name")!) } ``` ### Output: obj.data.wtv(named: "name") ```swift DataObject.variables["company"]["name"] 👉 FOUND: (label: Optional("name"), value: Johns Group) DataObject.variables["name"] 👉 FOUND: (label: Optional("name"), value: Kurtis Weissnat) ```
1.1.0
2 years ago
# DataObject *DataObject(Any)* ## Basic Example ```swift let obj = DataObject("init_value") .set(variable: "SomeValue", value: "qwerty") .set(variable: "nil", value: nil) XCTAssertEqual(obj.value(), "init_value") XCTAssertEqual(obj.SomeValue.value(), "qwerty") XCTAssertEqual(obj.nil, DataObject()) ``` ## [SURL](https://github.com/0xLeif/SURL) JSON Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.variables.keys) // [AnyHashable("response"), AnyHashable("data")] print(obj.data) } ``` <details> <summary>JSON</summary> ```json { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } ``` </details> ### Output: obj.data ```swift DataObject { | Variables | * id: 7 (__NSCFNumber) | * value: 500 bytes (Data) | * address: { city = Howemouth; geo = { lat = "24.8918"; lng = "21.8984"; }; street = "Rex Trail"; suite = "Suite 280"; zipcode = "58804-1099"; } (__NSDictionaryI) | * email: [email protected] (__NSCFString) | * json: { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } (String) | * website: elvis.io (NSTaggedPointerString) | * username: Elwyn.Skiles (__NSCFString) | * company: { bs = "generate enterprise e-tailers"; catchPhrase = "Configurable multimedia task-force"; name = "Johns Group"; } (__NSDictionaryI) | * phone: 210.067.6132 (__NSCFString) | * name: Kurtis Weissnat (__NSCFString) } ``` ## [WTV](https://github.com/0xLeif/WTV) Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.data.wtv(named: "name")!) } ``` ### Output: obj.data.wtv(named: "name") ```swift DataObject.variables["company"]["name"] 👉 FOUND: (label: Optional("name"), value: Johns Group) DataObject.variables["name"] 👉 FOUND: (label: Optional("name"), value: Kurtis Weissnat) ```
1.0.0
2 years ago
# DataObject *DataObject(Any)* ## Basic Example ```swift let obj = DataObject("init_value") .set(variable: "SomeValue", value: "qwerty") .set(variable: "nil", value: nil) XCTAssertEqual(obj.value(), "init_value") XCTAssertEqual(obj.SomeValue.value(), "qwerty") XCTAssertEqual(obj.nil, DataObject()) ``` ## [SURL](https://github.com/0xLeif/SURL) JSON Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.variables.keys) // [AnyHashable("response"), AnyHashable("data")] print(obj.data) } ``` <details> <summary>JSON</summary> ```json { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } ``` </details> ### Output: obj.data ```swift DataObject { | Variables | * id: 7 (__NSCFNumber) | * value: 500 bytes (Data) | * address: { city = Howemouth; geo = { lat = "24.8918"; lng = "21.8984"; }; street = "Rex Trail"; suite = "Suite 280"; zipcode = "58804-1099"; } (__NSDictionaryI) | * email: [email protected] (__NSCFString) | * json: { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } (String) | * website: elvis.io (NSTaggedPointerString) | * username: Elwyn.Skiles (__NSCFString) | * company: { bs = "generate enterprise e-tailers"; catchPhrase = "Configurable multimedia task-force"; name = "Johns Group"; } (__NSDictionaryI) | * phone: 210.067.6132 (__NSCFString) | * name: Kurtis Weissnat (__NSCFString) } ``` ## [WTV](https://github.com/0xLeif/WTV) Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.data.wtv(named: "name")!) } ``` ### Output: obj.data.wtv(named: "name") ```swift DataObject.variables["company"]["name"] 👉 FOUND: (label: Optional("name"), value: Johns Group) DataObject.variables["name"] 👉 FOUND: (label: Optional("name"), value: Kurtis Weissnat) ```
0.2.2
3 years ago
Always add Data when possible
3 years ago
Fuable
3 years ago
# DataObject: FuableClass *DataObject(Any)+[SwiftFu](https://github.com/0xLeif/SwiftFu)* ## Basic Example ```swift let obj = DataObject("init_value") .add(variable: "SomeValue", value: "qwerty") .add(variable: "nil", value: nil) XCTAssertEqual(obj.value(), "init_value") XCTAssertEqual(obj.SomeValue.value(), "qwerty") XCTAssertEqual(obj.nil, DataObject()) ``` ## [SURL](https://github.com/0xLeif/SURL) JSON Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.variables.keys) // [AnyHashable("response"), AnyHashable("data")] print(obj.data) } ``` <details> <summary>JSON</summary> ```json { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } ``` </details> ### Output: obj.data ```swift DataObject { | Variables | * id: 7 (__NSCFNumber) | * value: 500 bytes (Data) | * address: { city = Howemouth; geo = { lat = "24.8918"; lng = "21.8984"; }; street = "Rex Trail"; suite = "Suite 280"; zipcode = "58804-1099"; } (__NSDictionaryI) | * email: [email protected] (__NSCFString) | * json: { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } (String) | * website: elvis.io (NSTaggedPointerString) | * username: Elwyn.Skiles (__NSCFString) | * company: { bs = "generate enterprise e-tailers"; catchPhrase = "Configurable multimedia task-force"; name = "Johns Group"; } (__NSDictionaryI) | * phone: 210.067.6132 (__NSCFString) | * name: Kurtis Weissnat (__NSCFString) } ``` ## [WTV](https://github.com/0xLeif/WTV) Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.data.wtv(named: "name")!) } ``` ### Output: obj.data.wtv(named: "name") ```swift DataObject.variables["company"]["name"] 👉 FOUND: (label: Optional("name"), value: Johns Group) DataObject.variables["name"] 👉 FOUND: (label: Optional("name"), value: Kurtis Weissnat) ```
DataObject(Any)
3 years ago
# DataObject *DataObject(Any)* ## Basic Example ```swift let obj = DataObject("init_value") .add(variable: "SomeValue", value: "qwerty") .add(variable: "nil", value: nil) XCTAssertEqual(obj.value(), "init_value") XCTAssertEqual(obj.SomeValue.value(), "qwerty") XCTAssertEqual(obj.nil, DataObject()) ``` ## [SURL](https://github.com/0xLeif/SURL) JSON Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.variables.keys) // [AnyHashable("response"), AnyHashable("data")] print(obj.data) } ``` <details> <summary>JSON</summary> ```json { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } ``` </details> ### Output: obj.data ```swift DataObject { | Variables | * id: 7 (__NSCFNumber) | * value: 500 bytes (Data) | * address: { city = Howemouth; geo = { lat = "24.8918"; lng = "21.8984"; }; street = "Rex Trail"; suite = "Suite 280"; zipcode = "58804-1099"; } (__NSDictionaryI) | * email: [email protected] (__NSCFString) | * json: { "id": 7, "name": "Kurtis Weissnat", "username": "Elwyn.Skiles", "email": "[email protected]", "address": { "street": "Rex Trail", "suite": "Suite 280", "city": "Howemouth", "zipcode": "58804-1099", "geo": { "lat": "24.8918", "lng": "21.8984" } }, "phone": "210.067.6132", "website": "elvis.io", "company": { "name": "Johns Group", "catchPhrase": "Configurable multimedia task-force", "bs": "generate enterprise e-tailers" } } (String) | * website: elvis.io (NSTaggedPointerString) | * username: Elwyn.Skiles (__NSCFString) | * company: { bs = "generate enterprise e-tailers"; catchPhrase = "Configurable multimedia task-force"; name = "Johns Group"; } (__NSDictionaryI) | * phone: 210.067.6132 (__NSCFString) | * name: Kurtis Weissnat (__NSCFString) } ``` ## [WTV](https://github.com/0xLeif/WTV) Example ```swift "https://jsonplaceholder.typicode.com/users/7".url? .get { (obj) in print(obj.data.wtv(named: "name")!) } ``` ### Output: obj.data.wtv(named: "name") ```swift DataObject.variables["company"]["name"] 👉 FOUND: (label: Optional("name"), value: Johns Group) DataObject.variables["name"] 👉 FOUND: (label: Optional("name"), value: Kurtis Weissnat) ```
0xLet/SURL 0.1.1
🕸 Swifty URL
⭐️ 3
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
canImport(Combine)
3 years ago
## Example SURL ```swift "https://raw.githubusercontent.com/0xLeif/0xLeif/master/README.md" .url? .get { (data, response, error) in print(String(data: data!, encoding: .utf8)) } ```
URL+
3 years ago
# Overview ## Example SURL ```swift "https://raw.githubusercontent.com/0xLeif/0xLeif/master/README.md" .url? .get { (data, response, error) in print(String(data: data!, encoding: .utf8)) } ``` ## URLRequest+ HTTPRequestMethod ```swift public extension URLRequest { // MARK: HTTPRequestMethod enum HTTPRequestMethod: String { case GET case HEAD case POST case PUT case DELETE case CONNECT case OPTIONS case TRACE case PATCH } } ``` ## URLRequest+DataTask ```swift public extension URLRequest { var dataTask: URLSessionDataTask @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) var dataTaskPublisher: URLSession.DataTaskPublisher func dataTask(withHandler handler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask } ``` ## URLRequest+DataTasks ```swift public extension URL { // MARK: URLSession DataTasks var dataTask: URLSessionDataTask { URLSession.shared.dataTask(with: self) } @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) var dataTaskPublisher: URLSession.DataTaskPublisher { URLSession.shared.dataTaskPublisher(for: self) } func dataTask(withHandler handler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask { URLSession.shared.dataTask(with: self, completionHandler: handler) } // ... } ```
0xLet/Observation 0.0.2
🔭 Observable variable project using E.num and Chain
⭐️ 3
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
0.0.2
3 years ago
Modifiable `callChain` ```swift public class ObservedValue<T> { private(set) public var value: T? public var callChain: Chain = .end public var didChangeHandler: Chain? public init(value: T? = nil) { self.value = value self.callChain = .complete( .out { [weak self] in self?.didChangeHandler?.run(name: "ObservedValue<\(T.self)>.didChangeHandler") ?? .void } ) } @discardableResult public func update(value: T) -> Variable { self.value = value return callChain.run(name: "ObservedValue<\(T.self)>.callChain") } } ```
ObservedValue<T>
3 years ago
## Example Code ```swift let observedValue: ObservedValue<Int> = ObservedValue() observedValue.didChangeHandler = .complete( .void { sleep(1) print("Done!") XCTAssertNotNil(observedValue.value) } ) observedValue.update(value: 5) observedValue.update(value: 15) observedValue.update(value: 25) ``` ## Property Wrapper ```swift @Observed var index = 4 _index.didChangeHandler = .link( .void { viewModel.update(value: values[index]) }, .complete( .void { updateUI() } ) ) guard values.count < index && index >= 0 else { return } index += 1 ```
0xLet/FLite 1.0.0
📲 FluentSQLiteDriver Wrapper for iOS and macOS
⭐️ 3
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
FLite.init
3 years ago
## FLite init ```swift public init( configuration: SQLiteConfiguration = .init(storage: .memory), loggerLabel: String ) public init( eventGroup: EventLoopGroup, threadPool: NIOThreadPool, configuration: DatabaseConfigurationFactory, id: DatabaseID, logger: Logger ) public init( threads: Int, configuration: DatabaseConfigurationFactory, id: DatabaseID, logger: Logger ) ``` ## Example Usage ```swift var values = [Todo]() try? FLite.memory.prepare(migration: Todo.self).wait() try! FLite.memory.add(model: Todo(title: "Hello World", strings: ["hello", "world"])).wait() FLite.memory.all(model: Todo.self) .whenSuccess { (todos) in values = todos } ``` ## Persisted Data ```swift var persist = FLite(configuration: .file("\(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path ?? "")/default.sqlite"), loggerLabel: "persisted-FLITE") ``` ## Example [Model](https://docs.vapor.codes/4.0/fluent/model/) & [Migration](https://docs.vapor.codes/4.0/fluent/migration/) ```swift import FluentSQLiteDriver internal final class Todo: Model { init() { } static let schema: String = "todos" /// The unique identifier for this `Todo`. @ID(key: .id) var id: UUID? /// A title describing what this `Todo` entails. @Field(key: "title") var title: String @Field(key: "someList") var someList: [String] /// Creates a new `Todo`. init(id: UUID? = nil, title: String, strings: [String]) { self.id = id self.title = title self.someList = strings } } /// Allows `Todo` to be used as a dynamic migration. extension Todo: Migration { func prepare(on database: Database) -> EventLoopFuture<Void> { database.schema(Todo.schema) .id() .field("title", .string, .required) .field("someList", .array(of: .string), .required) .create() } func revert(on database: Database) -> EventLoopFuture<Void> { database.schema(Todo.schema).delete() } } ```
Vapor 4 Support
3 years ago
Vapor 4 Release
3 years ago
# Requires Xcode >= 11.5 and Swift 5.2 ```swift // Use FLite.main // Default Storage Type: Memory try? FLite.prepare(migration: Todo.self).wait() try! FLite.add(model: Todo(title: "Hello World", strings: ["hello", "world"])).wait() FLite.fetch(model: Todo.self) .whenSuccess { (values) in print(values) } ```
Vapor 3 Release
3 years ago
```swift FLite.storage = .memory FLite.prepare(model: Todo.self) FLite.create(model: Todo(title: "Hello World")) FLite.fetch(model: Todo.self) { values in print(values) } ```
iOS macOS
0xLet/WTV 0.1.1
👀 Where's The Variable?
⭐️ 3
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Support Arrays
3 years ago
Initial POC
3 years ago
```swift struct Dictionary { var value = [ "someValue": [ "what...?": 999 ] ] } struct Value { let somes = Dictionary() } struct RootValue { let child: Value = Value() } struct OuterValue { let root = RootValue() } func testExample() { guard let output = WTV(OuterValue()).variable(named: "what...?") else { XCTFail() return } print(output) XCTAssert(output.contains("FOUND")) } ``` > OuterValue - Inside: root - Inside: child - Inside: somes - Inside: value - Inside: someValue - Inside: someValue - Inside: what...? - FOUND: (label: Optional("what...?"), value: 999)
0xLet/EKit 0.1.0
🙌 Swift Emoji Kit
⭐️ 3
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
3 years ago
0xLet/CensoredString 0.1.0
🤬 Quick way to censor occurrences of certain words
⭐️ 2
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Initial CensoredString
3 years ago
0xLet/Combino 0.2.0
🔮 Combine async extensions using DispatchQueue
⭐️ 2
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Combino++
3 years ago
## Named Tuple Values ```swift Future<(data: Data?, response: URLResponse?), Error> ``` ## Exported import Combine ```swift @_exported import Combine ```
Combino+
3 years ago
### promise ```swift promise<T>(work: @escaping (@escaping Future<T, Error>.Promise) -> Void) -> Future<T, Error> promise(work: @escaping (@escaping Future<Void, Error>.Promise) -> Void) -> Future<Void, Error> ``` ### do ```swift do<T>(withDelay delay: UInt32 = 0, work: @escaping () throws -> T) -> Future<T, Error> do(withDelay delay: UInt32 = 0, work: @escaping () throws -> Void = {}) -> Future<Void, Error> ``` ### main ```swift main<T>(withDelay delay: UInt32 = 0, work: @escaping () throws -> T) -> Future<T, Error> main(withDelay delay: UInt32 = 0, work: @escaping () throws -> Void = {}) -> Future<Void, Error> ``` ### fetch ```swift fetch(url: URLRequest) -> Future<(Data?, URLResponse?), Error> fetch(url: URL) -> Future<(Data?, URLResponse?), Error> ``` ### post ```swift post(request: URLRequest) -> Future<(Data?, URLResponse?), Error> post(url: URL, withData data: (() -> Data)? = nil) -> Future<(Data?, URLResponse?), Error> ``` ## Combino Examples ### .sink(SinkEvent) ```swift Combino .do(withDelay: 5) .sink(.success { someFunction() }) .store(in: &bag) ``` ### .sink(() -> [SinkEvents]) ```swift Combino .do(withDelay: 5) { "Hello World!" } .sink { [ .completion { sema.signal() }, .success { value in XCTAssertEqual(value, "Hello World!") }, .failure { _ in XCTAssert(false) } ] } .store(in: &bag) ```
Combino
3 years ago
### promise ```swift promise<T>(work: @escaping (@escaping Future<T, Error>.Promise) -> Void) -> Future<T, Error> promise(work: @escaping (@escaping Future<Void, Error>.Promise) -> Void) -> Future<Void, Error> ``` ### do ```swift do<T>(withDelay delay: UInt32 = 0, work: @escaping () throws -> T) -> Future<T, Error> do(withDelay delay: UInt32 = 0, work: @escaping () throws -> Void = {}) -> Future<Void, Error> ``` ### main ```swift main<T>(withDelay delay: UInt32 = 0, work: @escaping () throws -> T) -> Future<T, Error> main(withDelay delay: UInt32 = 0, work: @escaping () throws -> Void = {}) -> Future<Void, Error> ``` ### fetch ```swift fetch(url: URLRequest) -> Future<(Data?, URLResponse?), Error> fetch(url: URL) -> Future<(Data?, URLResponse?), Error> ``` ### post ```swift post(request: URLRequest) -> Future<(Data?, URLResponse?), Error> post(url: URL, withData data: (() -> Data)? = nil) -> Future<(Data?, URLResponse?), Error> ``` ## Combino Examples ### .sink(SinkEvent) ```swift Combino .do(withDelay: 5) .sink(.success { someFunction() }) .store(in: &bag) ``` ### .sink(() -> [SinkEvents]) ```swift Combino .do(withDelay: 5) { "Hello World!" } .sink { [ .completion { sema.signal() }, .success { value in XCTAssertEqual(value, "Hello World!") }, .failure { _ in XCTAssert(false) } ] } .store(in: &bag) ```
iOS macOS watchOS tvOS
0xLet/Fake 0.1.1
🥸 Fake Data
⭐️ 2
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Fake Names & Words
3 years ago
### Fake.Word ```swift print(Fake.Word.Random.sentence(words: 10)) // After come water toy want ring had fish which ran ``` ### Fake.Name ```swift print(Fake.Name.Random.full) // Jackson Hunter ```
0xLet/Chain 0.3.0
⛓ Enum to chain functions together
⭐️ 1
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Chain Head
3 years ago
## Head Functions ### runHead ```swift func runHead( name: String? = nil, input: Variable? = nil, logging: Bool = false ) -> Variable ``` ### dropHead ```swift func dropHead() -> Chain? ```
Chain Output
3 years ago
## Example Code ```swift let output = Chain.link( .out { "First" }, .link( .in { print("Value: \($0)") }, .multi( [ .multi([ .end, .end, .end ]), .link(.out { "Link" }, .link( .out { "Last" }, .complete(.inout { value in guard case .string(let value) = value else { XCTFail() return .void } return .string("\(value) !!!") }) )) ] )) ) .run(name: "ChainTests-testOutput") ``` ## Normal Chain Output ```swift (lldb) po output ▿ Variable ▿ array : 2 elements ▿ 0 : Variable - string : "First" ▿ 1 : Variable ▿ array : 2 elements - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable ▿ array : 3 elements ▿ 0 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 2 : Variable ▿ array : 1 element - 0 : E.Variable.void ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable - string : "Link" ▿ 1 : Variable ▿ array : 2 elements ▿ 0 : Variable - string : "Last" ▿ 1 : Variable ▿ array : 1 element ▿ 0 : Variable - string : "Last !!!" ``` ## Flattened Chain Output ```swift (lldb) po output.flatten ▿ Variable ▿ array : 8 elements ▿ 0 : Variable - string : "First" - 1 : E.Variable.void - 2 : E.Variable.void - 3 : E.Variable.void - 4 : E.Variable.void ▿ 5 : Variable - string : "Link" ▿ 6 : Variable - string : "Last" ▿ 7 : Variable - string : "Last !!!" ```
Chain.link
3 years ago
```swift Chain.link( { print("Chain.link") }, .complete { print("Chain.complete") } ) .run() ```
0xLet/ROTx 0.1.0
🔄 Swift+ROT13
⭐️ 0
🕓 3 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Initial Release
3 years ago
# 0.1.0 *[ROT13](https://en.wikipedia.org/wiki/ROT13) with a shift* ```swift "Hello, World!".rot13() // Uryyb, Jbeyq! "Uryyb, Jbeyq!".rot13() // Hello, World! ``` ## String+ROTx ### shifted ```swift "abcdefghijklmnopqrstuvwxyz".shifted(by: 1) // bcdefghijklmnopqrstuvwxyza "abcdefghijklmnopqrstuvwxyz".shifted(by: 0) // abcdefghijklmnopqrstuvwxyz "abcdefghijklmnopqrstuvwxyz".shifted(by: -1) // zabcdefghijklmnopqrstuvwxy ``` ### rot13 ```swift "abcdefghijklmnopqrstuvwxyz".rot13() // nopqrstuvwxyzabcdefghijklm "nopqrstuvwxyzabcdefghijklm".rot13() // abcdefghijklmnopqrstuvwxyz ```

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics