Skip to content

Easy Equatable protocol extensions generator for swift objects

License

Notifications You must be signed in to change notification settings

dfrishbuter/Equator

Repository files navigation

Equator

Swift4 Platform License

Equator is useful extension for XCode IDE. This tool has a really simple mechanism, that allows to generate fully implemented Equatable protocol extensions for swift objects just in two clicks.

Installation 🎬

  1. Download and extract .zip file containing latest release from the releases tab of the repo
  2. Drag Equator.app to your Applications folder and run the app
  3. Go to System Preferences -> Extensions -> Xcode Source Editor and enable the extension
  4. Restart the Xcode

Usage 🏄‍♂️

Select all lines of target class/struct/enum body.

struct User {                <- Start of selection
    public var name: String
    public var id: Int
}                            <- End of selection

Go to Editor -> Equator -> Generate Swift Equatable and you'll achieve:

extension User: Equatable {
    static func == (lhs: User, rhs: User) -> Bool {
        return lhs.name == rhs.name &&
               lhs.id == rhs.id
    }
}

Author ✍️

Dmitry Frishbuter, dmitry.frishbuter@gmail.com

License 📃

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

About

Easy Equatable protocol extensions generator for swift objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published