Options
All
  • Public
  • Public/Protected
  • All
Menu

Module semantic

Index

Functions

  • evaluate(expressions: boolean[], logicalOps: string[]): boolean
  • Performs propositional logic on a sequence of expressions.

    Parameters

    • expressions: boolean[]

      Array of expressions

    • logicalOps: string[]

      Array of operators where the first item is the operation between the first and second item in expression and so forth

    Returns boolean

    the result of the processing of all expressions

  • express(a: any, b: any, op: string): boolean
  • Expresses the relation of a to be using a generic operator.

    Parameters

    • a: any

      Left-side value

    • b: any

      Right-side value

    • op: string

      Operator to apply

    Returns boolean

    expressive value of a op b

  • matchWords(obj: Record<string, any>, words: Word[]): boolean
  • Check if object matches the rules formulated by the sequence of words.

    throws

    {@link ObjectKeyNotFound} This exception is thrown when the field in a word was not found in the given object.

    Parameters

    • obj: Record<string, any>

      Object to validate

    • words: Word[]

      Sequence of words to formulate the set of rules to apply

    Returns boolean

Generated using TypeDoc