Skip to content

Get Single prop from props#54

Open
radenkovic wants to merge 3 commits intoyldio:masterfrom
radenkovic:feature/getProp
Open

Get Single prop from props#54
radenkovic wants to merge 3 commits intoyldio:masterfrom
radenkovic:feature/getProp

Conversation

@radenkovic
Copy link

@radenkovic radenkovic commented Oct 3, 2020

Allows use of get(), also supports lodash jsonPath: get('theme.colorPrimary')

  • get()
  • tests
  • Readme
  • Formatting/linting

@sergioramos
Copy link
Member

This is great, thank you 🙏

  1. Feel free to choose a different name, I like all your suggestions 😉;
  2. If you use something like lodash.get, you get a battle tested handler of the attribute getter.

@radenkovic
Copy link
Author

This is great, thank you

  1. Feel free to choose a different name, I like all your suggestions wink;
  2. If you use something like lodash.get, you get a battle tested handler of the attribute getter.

I just updated it to use lodash/fp get, at first I was hesitant to include lodash.

  • Property is renamed to get()
  • Added ts definition

I feel this is good to go!

@callmeberzerker
Copy link

Go for the win? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants