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

Allow paths to be excluded from transformation #23

Closed
mojavelinux opened this issue May 6, 2018 · 5 comments · Fixed by #37
Closed

Allow paths to be excluded from transformation #23

mojavelinux opened this issue May 6, 2018 · 5 comments · Fixed by #37
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@mojavelinux
Copy link

mojavelinux commented May 6, 2018

Issuehunt badges

Allow certain paths to be excluded from transformation (excludePaths). This is necessary when certain subpaths of the structure hold pure data that are not part of the model. For example, one of the keys might hold key-value pair data, but that key-value pair data cannot be corrupted.

I'm imagining something like:

camelcaseKeys(raw, { deep: true, excludePaths: ['path.to.hash'] })

It would be the data inside this path, not the path itself, that would be excluded.


IssueHunt Summary

stroncium stroncium has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@sindresorhus
Copy link
Owner

Sounds like a valid use-case. PR welcome.

@mojavelinux
Copy link
Author

Great. That's what I needed to know.

@mojavelinux
Copy link
Author

I was thinking about this question of whether the specified path itself should be excluded, or whether it just excludes its children. That got me thinking that perhaps the right name for the option is "stopPaths" instead of "excludePaths". (And, of course, this is related to the deep option). I'm open to suggestions, and that can be tuned once we're looking at some code.

@IssueHuntBot
Copy link

@IssueHunt has funded $60.00 to this issue.


stroncium added a commit to stroncium/camelcase-keys that referenced this issue May 3, 2019
@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Oct 31, 2019

@sindresorhus has rewarded $54.00 to @stroncium. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $6.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants