Skip to content

Execute functions asynchronously without rewriting their definitions

Notifications You must be signed in to change notification settings

BrianSemiglia/AsyncBridge

Repository files navigation

AsyncBridge

Execute callback-based and sync functions asynchronously without rewriting their definitions.

// Callback Conversion

// Before:
foo.bar("baz", completion: { (result: Int) in })

// After:
async let result: Int = await foo.bar >>> ("baz")
// Sync Conversion

// Before:
let result: Int = foo.bar("baz")

// After:
async let result: Int = await foo.bar >>> ("baz")

About

Execute functions asynchronously without rewriting their definitions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages