Options
All
  • Public
  • Public/Protected
  • All
Menu

@jackdbd/checks

This package contains various functions to check inputs (i.e. predicates).

Index

Functions

  • isAustrianVat(s: string): boolean
  • Checks whether a string is a valid Austrian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isBelgianVat(s: string): boolean
  • Checks whether a string is a valid Belgian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isBoolean(x: any): boolean
  • Checks whether the argument passed to this function is a boolean or not.

    Parameters

    • x: any

    Returns boolean

  • isBulgarianVat(s: string): boolean
  • Checks whether a string is a valid Bulgarian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isCloudRunJob(env: ProcessEnv): boolean
  • isCloudRunService(env: ProcessEnv): boolean
  • isCyprioticVat(s: string): boolean
  • Checks whether a string is a valid Cypriotic VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isCzechVat(s: string): boolean
  • Checks whether a string is a valid Czech VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isDanishVat(s: string): boolean
  • Checks whether a string is a valid Danish VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isDevelopment(env: ProcessEnv): boolean
  • Checks whether the environment variable NODE_ENV is set to development or not.

    Parameters

    • env: ProcessEnv

    Returns boolean

  • isError(x: any): x is Error
  • isEstonianVat(s: string): boolean
  • Checks whether a string is a valid Estonian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isEuropeanVat(s: string): boolean
  • isFinnishVat(s: string): boolean
  • Checks whether a string is a valid Finnish VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isFrenchVat(s: string): boolean
  • Checks whether a string is a valid French VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isGermanVat(s: string): boolean
  • Checks whether a string is a valid German VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isGreekVat(s: string): boolean
  • Checks whether a string is a valid Greek VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isHungarianVat(s: string): boolean
  • Checks whether a string is a valid Hungarian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isIrishVat(s: string): boolean
  • Checks whether a string is a valid Irish VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isItalianFiscalCode(s: string): boolean
  • isItalianVat(s: string): boolean
  • Checks whether a string is a valid Italian VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isLuxembourgishVat(s: string): boolean
  • Checks whether a string is a valid Luxembourgish VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isNumber(x: any): x is number
  • Checks whether the argument passed to this function is a number or not.

    Parameters

    • x: any

    Returns x is number

  • isOnCloudFunctions(env: ProcessEnv): boolean
  • isOnCloudRun(env: ProcessEnv): boolean
  • Checks whether a service is running on Cloud Run or not.

    deprecated

    Use {@link @jackdbd/checks#isCloudRunJob} or {@link @jackdbd/checks#isCloudRunService} instead.

    see

    Container runtime contract - Anthos

    Parameters

    • env: ProcessEnv

    Returns boolean

  • isOnGithub(env: ProcessEnv): boolean
  • isSpanishVat(s: string): boolean
  • Checks whether a string is a valid Spanish VAT number or not.

    Parameters

    • s: string

    Returns boolean

  • isString(x: any): x is string
  • Checks whether the argument passed to this function is a string or not.

    Parameters

    • x: any

    Returns x is string

  • isTest(env: ProcessEnv): boolean
  • Checks whether the environment variable NODE_ENV is set to test or not.

    Parameters

    • env: ProcessEnv

    Returns boolean

  • isTimeout(x: any): x is Timeout
  • isUkVat(s: string): boolean

Generated using TypeDoc