Skip to content

Repository files navigation

GitHub

KeyPathString

keyPathString macro allows you to generate a property name string value of a key path expression.

Installation

Xcode

  1. Click File > Add Package Dependencies
  2. Paste the following link into the search field on the upper-right:
    https://github.com/Jaesung-Jung/KeyPathStringMacro.git
    

Swift Package Manager

In Package.swift:

dependencies: [
    .package(url: "https://github.com/Jaesung-Jung/KeyPathStringMacro.git", from: "0.1.0")
]

And then add the dependency to your targets.

Usage

let keyPathString = #keyPathString(\User.name) // "name"

License

MIT license. See LICENSE for details.

About

`keyPathString` macro allows you to generate a property name string value of a key path expression.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages