Options
All
  • Public
  • Public/Protected
  • All
Menu

Module var

Other Functions

Variable New Functions

Other Functions

varGetOneOfOrElse

  • varGetOneOfOrElse<T, D>(list: T[], value: T, defaultValue?: D): T | D
  • name

    oneOfOrElse

    description

    Get on from list or other value

    since

    0.0.86

    Type parameters

    • T

    • D

    Parameters

    • list: T[]
    • value: T
    • defaultValue: D = ...

    Returns T | D

varGetRawType

  • varGetRawType(value: any): string
  • name

    varGetRawType

    description

    Get the raw type string of a value, e.g., [object Object].

    Parameters

    • value: any

    Returns string

varGetType

  • varGetType(value: any): string
  • Parameters

    • value: any

    Returns string

Variable New Functions

newError

  • newError(message: any, cause?: any, name?: string): Error
  • description

    Instantiates new plain Error.

    summary

    import { newError } from "@corefunc/corefunc/var/new/error";

    since

    0.3.34

    Parameters

    • message: any

      Message property. Or error itself.

    • Optional cause: any

      Cause of error.

    • Optional name: string

      Overrides name. Default is 'Error'.

    Returns Error

    • Plain Error instance.

Generated using TypeDoc