Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

ivanmoskalev/xn

Repository files navigation

xn

Swift License

Useful functions for Swift and Apple Platform SDKs. Basically a jumble of reusable code.

As of now, this has not been stabilized yet, however it is in use in some projects that are live on the App Store. Regardless, use at your own risk!

Available Functions

Optionals

Unwrap an optional value or throw an error:

let value: Int? = 42
let nonOptional = try Xn.unwrap(value) // nonOptional is of type Int

Debug

Print value of the variable with callsite information and return it:

let result = Xn.dbg(42) // Prints "MyModule/MyFile.swift:23 42" in debug builds

About

Useful Swift Extensions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages