2.0.0 • Published 1 year ago

ic-operator-validation v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

IC-OPERATOR-VALIDATION

This lib compares and validates two values you provide.

After importing the lib, for the implementation we need to:

Instance class OperatorValidator with the following parameters

{
  type_of_value: string,
  value: unknown,
  value_to_compare: unknown,
  operator?: string // if empty it's going to consider 'EQUALS'
}

The values for type_of_value can be:

'string', 'boolean', 'number', 'date', 'datetime'

The values for operator can be:

'EQUALS', 'DIFF', 'STARTING', 'ENDING', 'BIGGER', 'MINOR', 'BIGGEREQ', 'MINOREQ', 'IN', 'NOT_IN', 'HAS_DAY', 'HAS_MONTH', 'HAS_YEAR', 'IN_WEEK'

Call OperatorValidator.compare()

It will return a boolean telling you if the values you are comparing match the operator you defined. True means it matches and false means it doesn't.

2.0.0

1 year ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago