Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

isDev

  • isDev(): boolean
  • Checks if NODE_ENV has a value of 'development'.

    Returns boolean

    Has a value of 'development' or not.

isJest

  • isJest(): boolean
  • Checks if app runs in Jest environment or not.

    Returns boolean

    Is running in Jest environment or not.

isLocalDev

  • isLocalDev(): boolean
  • Checks if app is running in local development mode or not.

    Returns boolean

    Runs in local development mode or not.

isNil

  • isNil(val: any): val is undefined | null
  • Checks if a value is (null) or (undefined).

    Parameters

    • val: any

      The value to check.

    Returns val is undefined | null

    Is (null) or (undefined).

isNodeEnv

  • isNodeEnv(envName: any): boolean
  • Checks if NODE_ENV environment variable has a specific value.

    Parameters

    • envName: any

      The name to check.

    Returns boolean

    Has the value of envName or not.

isProd

  • isProd(): boolean
  • Checks if NODE_ENV has a value of 'production'.

    Returns boolean

    Has a value of 'production' or not.

isTest

  • isTest(): boolean
  • Checks if NODE_ENV has a value of 'test'.

    Returns boolean

    Has a value of 'test' or not.

isTruely

  • isTruely(val: any): boolean
  • Handles a value as string and checks if it prepresents a (true).

    Parameters

    • val: any

      The input value.

    Returns boolean

    Can be handled as (true) value. Possible values are: '1', 'true', 'y', 'yes'

readStream

  • readStream(stream: NodeJS.ReadableStream, options?: IReadStreamOptions): Promise<Buffer>
  • Reads the current content of a stream.

    Parameters

    • stream: NodeJS.ReadableStream

      The input stream.

    • Optional options: IReadStreamOptions

      Custom options.

    Returns Promise<Buffer>

    The promise with the read data.

tick

  • tick<TResult>(action: (...args: any[]) => Promise<TResult>, ...args: any[]): Promise<TResult>
  • Executes an actions in background.

    Type parameters

    • TResult

    Parameters

    • action: (...args: any[]) => Promise<TResult>

      The action to invoke.

        • (...args: any[]): Promise<TResult>
        • Parameters

          • Rest ...args: any[]

          Returns Promise<TResult>

    • Rest ...args: any[]

    Returns Promise<TResult>

    The promise with the result of the action.

toStringSafe

  • toStringSafe(val: any): string
  • Converts a value to a string.

    Parameters

    • val: any

      The input value.

    Returns string

    The value as string.

Generated using TypeDoc