Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/keys

Index

References

Functions

References

Renames and re-exports keys

Functions

  • keys<T>(x: T): (keyof T & string)[]
  • keys<T>(x: T): string[]
  • Returns a list containing the names of all the enumerable own properties of the supplied object. Note that the order of the output array is not guaranteed to be consistent across different JS platforms.

    example
     keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
    

    Type parameters

    • T: Record<any, any>

    Parameters

    • x: T

    Returns (keyof T & string)[]

    An array of the object's own properties.

  • Returns a list containing the names of all the enumerable own properties of the supplied object. Note that the order of the output array is not guaranteed to be consistent across different JS platforms.

    example
     keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
    

    Type parameters

    • T

    Parameters

    • x: T

    Returns string[]

    An array of the object's own properties.

Generated using TypeDoc