Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-method-in/docs/types/index.d"

Index

Functions

Functions

Export assignment isMethodIn

  • isMethodIn(value: any, property: any): boolean
  • Tests if an object has a specified method name, either own or inherited.

    Notes

    • Value arguments other than null or undefined are coerced to objects.
    • Non-symbol property arguments are coerced to strings.

    Parameters

    • value: any

      value to test

    • property: any

      property to test

    Returns boolean

    boolean indicating if an object has a specified method name

    Example

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