2.0.0 • Published 3 months ago

ic-operator-validation v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months 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

3 months ago

1.2.0

5 months ago

1.2.1

5 months ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago