Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const hasPropDefined

  • hasPropDefined(obj: unknown, prop: string): boolean
  • Checks if the given object has the given property.

    example

    isPropertyDefined({ wer: 'asd' }, 'wer'); // true isPropertyDefined({}, 'wer'); // false

    Parameters

    • obj: unknown

      The object to check.

    • prop: string

      The name of the property to search for.

    Returns boolean

    Whether the object has the property.

Legend

  • Function

Generated using TypeDoc