Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Export assignment isEnumerablePropertyIn

  • isEnumerablePropertyIn(value: any, property: any): boolean
  • Tests if an object's own or inherited property is enumerable.

    Parameters

    • value: any

      value to test

    • property: any

      property to test

    Returns boolean

    boolean indicating if an object property is enumerable

    Example

    var defineProperty = require( `@stdlib/utils/define-property` );
    
    var obj = {
        'boop': true
    };
    
    defineProperty( obj, 'beep', {
        'configurable': true,
        'enumerable': false,
        'writable': true,
        'value': true
    });
    
    var bool = isEnumerablePropertyIn( obj, 'boop' );
    // returns true
    
    bool = isEnumerablePropertyIn( obj, 'beep' );
    // returns false