SPeCS Packages Documentation
    Preparing search index...

    Utility methods to check preconditions.

    Index

    Constructors

    Methods

    • Checks if the array contains the element. Throws an expression if it doens't. The test is equivalent to array.indexOf(element) != -1.

      Type Parameters

      • T

      Parameters

      • array: T[]
      • element: T
      • Optionalmessage: string
      • Optionalsource: string

      Returns void

      Use the javascript array.includes(element) method instead

    • Type Parameters

      • T

      Parameters

      • value: T
      • type: string
      • Optionalsource: string
      • OptionaluserTypeName: string

      Returns void

      Use the javascript 'instanceof' operator instead

    • Checks if the given value is a join point. If a type is given, checks if the join point is an instance of the given type. Otherwise, throws an exception.

      Parameters

      • $jp: LaraJoinPoint
      • type: string | typeof LaraJoinPoint = LaraJoinPoint
      • isOptional: boolean = false

        If true, passes check if value is undefined

      Returns void

      Use the javascript instanceof operator instead

    • Parameters

      • booleanExpr: boolean
      • message: string = "Check.isTrue failed"
      • Optionalsource: string

      Returns void

      Use the javascript throw statement instead

    • Checks if two strings are identical, not considering empty spaces. Throws and exception if strings do not match.

      Parameters

      • currentString: string
      • expectedString: string

      Returns void