Swiftpack.co - shareup/async-extensions as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by shareup.
shareup/async-extensions v1.2.0
Useful extensions built upon Swift Concurrency
⭐️ 0
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/shareup/async-extensions.git", from: "v1.2.0")

AsyncExtensions

The AsyncExtensions target is a growing collection of useful functions and classes that take advantage of Swift's new Concurrency features.

The AsyncExtensions package also inlcudes the AsyncTestExtensions target, which contains async-friendly wrappers around XCTest assertions.

AsyncExtensions includes

  • AsyncInputStream: A convenient wrapper around InputStream allowing for simple, type-safe access to stream data.

AsyncTestExtensions includes

  • AssertEqual()
  • AssertTrue()
  • AssertFalse()
  • AssertNil()
  • AssertNotNil()
  • AssertThrowsError()
  • AssertNoThrow()

Installation

To use AsyncExtensions, add a dependency to your Package.swift file:

let package = Package(
  dependencies: [
    .package(
      name: "AsyncExtensions",
      url: "https://github.com/shareup/async-extensions.git",
      from: "1.1.0"
    )
  ]
)

To use AsyncTestExtensions in a test target, add it as a dependency:

.testTarget(
  name: "MyTests",
  dependencies: [
    .product(name: "AsyncTestExtensions", package: "AsyncExtensions")
  ]
)

License

The license for Database is the standard MIT licence. You can find it in the LICENSE file.

GitHub

link
Stars: 0
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v1.2.0
1 week ago

Add AssertNotNil() and AssertNoThrow() test assertions.

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