More complex scenarios that use the match function which use route parameters will need to parse the parameters out of the url. Currently this requires either writing custom code, copying the getParams function from parrot-core, or adding an additional dependency. Exporting it directly is better than any of these options.
How Has This Been Tested?
Ran npm pack and then imported into a parrot scenario.
Types of Changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation (adding or updating documentation)
[ ] Dependency update
Checklist:
[x] My change requires a change to the documentation and I have updated the documentation accordingly.
[x] My changes are in sync with the code style of this project.
[x] There aren't any other open Pull Requests for the same issue/update.
[ ] These changes should be applied to a maintenance branch.
[ ] This change requires cross browser checks.
[ ] This change impacts caching for client browsers.
[ ] I have added the Apache 2.0 license header to any new files created.
What is the Impact to Developers Using parrot?
Do not need to bring in another import to parse route parameters out of urls.
Description
Export the
getParams
utility function.Fixes #208
Motivation and Context
More complex scenarios that use the
match
function which use route parameters will need to parse the parameters out of the url. Currently this requires either writing custom code, copying thegetParams
function from parrot-core, or adding an additional dependency. Exporting it directly is better than any of these options.How Has This Been Tested?
Ran
npm pack
and then imported into a parrot scenario.Types of Changes
Checklist:
What is the Impact to Developers Using parrot?
Do not need to bring in another import to parse route parameters out of urls.