Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isPropertyKey

  • isPropertyKey(value: any): boolean
  • Tests whether a value is a property key.

    Notes

    • A property key is either a string, symbol, or a nonnegative integer.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating whether value is a property key

    Example

    var bool = isPropertyKey( 'beep' );
    // returns true

    Example

    var bool = isPropertyKey( 37 );
    // returns true

    Example

    var bool = isPropertyKey( {} );
    // returns false

    Example

    var bool = isPropertyKey( [] );
    // returns false