Swiftpack.co - devxoul/PureSwinject as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by devxoul.
devxoul/PureSwinject 1.3.0
Auto register Pure factories to Swinject
⭐️ 18
🕓 1 year ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/devxoul/PureSwinject.git", from: "1.3.0")

PureSwinject

Auto register Pure factories to Swinject

Usage

Before

container.register(MyModule.Factory.self) { r in
  MyModule.Factory(dependency: .init(
    foo: r.resolve(Foo.self)!,
    bar: r.resolve(Bar.self)!
  ))
}

After

container.autoregister(MyModule.Factory.self, dependency: MyModule.Dependency.init)

License

PureSwinject is under MIT license. See the LICENSE file for more info.

GitHub

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

Release Notes

1 year ago
  • Ensure thread safety

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