Contents

p-x9/swift-magic-mirror

Implementation of `Mirror` not affected by `CustomReflectable`.

About

Normal Mirror may not correctly yield property information if the object conforms to CustomReflectable.

For example, the following structure returns empty children.

struct Item: CustomReflectable {
    let title: String
    let value: Int

    var customMirror: Mirror {
        .init(self, children: [])
    }
}

I created MagicMirror so that information can be obtained correctly in such cases!

Usage

Simply replace MagicMirror in place of regular Mirror.

License

MagicMirror is released under the MIT License. See LICENSE

Package Metadata

Repository: p-x9/swift-magic-mirror

Default branch: main

README: README.md