Swift Package Index

ClosurePublisher

https://github.com/tgymnich/ClosurePublisher.git

📡 Combine Publisher for closure results


Compatibility

  • 0.0.1 and master
    5.3
    5.2
    5.1
    5.0
    4.2
  • 0.0.1 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS

ClosurePublisher

Simple publisher you can use to publish the result of a closure.

let publisher = Publishers.Closure(closure: { Date() } 

Usage

// swift-tools-version:5.0
import PackageDescription

let package = Package(
  name: "MyTool",
  dependencies: [
    .package(url: "https://github.com/tgymnich/ClosurePublisher.git", .from: "0.0.1"),
  ],
  targets: [
    .target(name: "MyTool", dependencies: ["ClosurePublisher"]),
  ]
)