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

feat(condition): Add Number Equal To Inspector #187

Merged
merged 4 commits into from
Jun 21, 2024
Merged

Conversation

Mallika05
Copy link
Contributor

@Mallika05 Mallika05 commented Jun 21, 2024

Description

Adds number_equal_to inspector

Motivation and Context

Ref: #183

This is for comparing a number's value, which is currently only possible using the string_match function like this:

sub.cnd.str.match({ object: {source_key: 'FIELD'}, pattern: '^[0-9]{4,}$'}),

This inspector is simpler to understand:

sub.cnd.num.equal_to({ object: {source_key: 'FIELD'}, value: 999 }), // 999

The target value type is float64, but this works just as well with integers.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@Mallika05 Mallika05 marked this pull request as ready for review June 21, 2024 18:31
@Mallika05 Mallika05 requested a review from a team as a code owner June 21, 2024 18:31
@Mallika05 Mallika05 assigned Mallika05 and jshlbrd and unassigned Mallika05 Jun 21, 2024
@Mallika05 Mallika05 merged commit aa1d54e into main Jun 21, 2024
9 checks passed
@Mallika05 Mallika05 deleted the mkaur/feat/num-eq branch June 21, 2024 20:19
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

2 participants