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

Fix/input extraction #60

Merged
merged 4 commits into from
Dec 20, 2024
Merged

Fix/input extraction #60

merged 4 commits into from
Dec 20, 2024

Conversation

brysonjbest
Copy link
Collaborator

Fix handling of 'today' for validations and generating of scenarios.
Add additional cleaning to validation inputs to allow for improved matching.
Increase variability of items generated using array of text options from validations.
Fix capturing of unique inputs for accurately displaying used/unused inputs on the BRM App.

Copy link
Collaborator

@timwekkenbc timwekkenbc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

const minValue = (numberValues && parseInt(numberValues[0], 10)) || 0;

console.log(numberValues, 'number values');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console log left in (two more further below as well)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Forgot cleanup.

Comment on lines 281 to 286
return text
?.trim()
?.replace(/[\[\]()]/g, '')
?.replace(/[''"]/g, '')
?.replace(/\s+/g, ' ')
?.trim();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suck at regex, but I think you can shorten it to:

text
  ?.trim()
  ?.replace(/[\[\]()'"‘’“”]/g, '')
  ?.replace(/\s+/g, ' ');

Not sure you need any of the double trim functions on any of the cleanValue functions either.

@brysonjbest brysonjbest merged commit 7b9a7a0 into dev Dec 20, 2024
4 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.

2 participants