Skip to content

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

Merged
Mallika05 merged 4 commits intomainfrom
mkaur/feat/num-eq
Jun 21, 2024
Merged

feat(condition): Add Number Equal To Inspector#187
Mallika05 merged 4 commits intomainfrom
mkaur/feat/num-eq

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

2 participants