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

added transform feature for confirm prompts #1212

Merged
merged 3 commits into from
Apr 23, 2023

Conversation

hjain5164
Copy link
Contributor

PR for the Feature request: Support for transformer function for confirm type #1207

The following changes are made:

  • Updated the pizza.js file in the examples of confirm prompt.
  • Added the transform default function to the Base class to extend this feature to other prompts if and when required. By default, it will return the value as is.
  • Updated confirm.js file to allow support of transforming the output, if the user has provided a transformation function.
  • Added a test case for this feature as well.

@SBoudrias
Copy link
Owner

Hey @hjain5164 thanks for sending a PR!

Would you mind updating the documentation as well?

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (500ff32) 73.00% compared to head (cd2b492) 73.00%.

❗ Current head cd2b492 differs from pull request most recent head 78e253b. Consider uploading reports for the commit 78e253b to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1212   +/-   ##
=======================================
  Coverage   73.00%   73.00%           
=======================================
  Files           8        8           
  Lines         163      163           
  Branches       26       26           
=======================================
  Hits          119      119           
  Misses         27       27           
  Partials       17       17           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hjain5164
Copy link
Contributor Author

@SBoudrias Sure, I will update the documentation as well.

@hjain5164
Copy link
Contributor Author

Hey, @SBoudrias made the changes in the documentation and refactored the code a little bit for better readability and scalability. Let me know if there are any more changes required.

@SBoudrias
Copy link
Owner

Thanks!

@SBoudrias SBoudrias merged commit aeab01d into SBoudrias:master Apr 23, 2023
5 checks 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.

None yet

3 participants