Contents

neothxt/listableproperties

ListableProperties macro allows to list all the properties of a struct, class and other types by adding static `getProperties()` func to it.

Installation

ListableProperties is currently available only via SPM (Swift Package Manager)

Basic Usage

@ListableProperties
struct Model {
    let firstProperty: String
    let secondProperty: Int
    var thirdProperty: Bool
}

print(Model.getProperties()) // This will return ["firstProperty", "secondProperty", "thirdProperty"]

And that's it. Enjoy :)

Package Metadata

Repository: neothxt/listableproperties

Default branch: main

README: README.md