Skip to content

Add the ability to alter the filenames of the merged JSON files #8

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bmds
Copy link

@bmds bmds commented Jan 4, 2016

When you have JSON files contained within multiple subdirectories the array keys for the sets of data become awkward. It would be nice to have the ability to pass a function to alter the names of these keys to something more appropriate.

I've updated the second argument to accept either a function or an object. Exiting implementations will continue to work as they do. However you could now call

jsoncombine(filePath, {
  dataConverter: function(data){...},
  pathConverter: function(data){...}
});

To pass either function independently & have the plugin fall back to a default if neither are passed.

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.

1 participant