Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[form-builder] Move pathUtils to util package #1181

Merged
merged 1 commit into from
Jan 25, 2019
Merged

[form-builder] Move pathUtils to util package #1181

merged 1 commit into from
Jan 25, 2019

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Jan 24, 2019

This PR moves the path utils from the form builder package into the @sanity/util package (as @sanity/util/paths.

It also:

  • Adds get(source, path, defaultValue) that mirrors lodash's _.get as closely as possible, but also supports key segments.
  • Adds fromString(pathAsString) as a complement for toString (bit unsure about the name, should it be "toArray" instead?)

@rexxars rexxars requested a review from bjoerge January 24, 2019 14:08
Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super solid 👏

@rexxars rexxars merged commit 2a93525 into next Jan 25, 2019
@rexxars rexxars deleted the path-utils branch January 25, 2019 10:28
@skogsmaskin skogsmaskin mentioned this pull request Feb 1, 2019
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.

2 participants