Skip to content

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

Open
bmds wants to merge 4 commits into
reflog:masterfrom
bmds:master
Open

Add the ability to alter the filenames of the merged JSON files#8
bmds wants to merge 4 commits into
reflog:masterfrom
bmds:master

Conversation

@bmds

@bmds bmds commented Jan 4, 2016

Copy link
Copy Markdown

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