Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/has-own-property/docs/types/index.d"

Index

Functions

Functions

Export assignment hasOwnProp

  • hasOwnProp(value: any, property: any): boolean
  • Tests if an object has a specified property.

    Parameters

    • value: any

      value to test

    • property: any

      property to test

    Returns boolean

    boolean indicating if an object has a specified property

    Example

    var beep = {
        'boop': true
    };
    
    var bool = hasOwnProp( beep, 'boop' );
    // returns true

    Example

    var beep = {
        'boop': true
    };
    
    var bool = hasOwnProp( beep, 'bap' );
    // returns false