americanexpress / parrot

✨ Scenario-based HTTP mocking
Apache License 2.0
139 stars 30 forks source link

feat(utils): export getParams function #209

Closed smackfu closed 1 year ago

smackfu commented 1 year ago

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 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

Checklist:

What is the Impact to Developers Using parrot?

Do not need to bring in another import to parse route parameters out of urls.