get-own-property-names-x
v3.1.2
Published
Creates an array of all properties (enumerable or not) found directly upon a given object.
Downloads
3,502
Maintainers
Readme
get-own-property-names-x
Creates an array of all properties (enumerable or not) found directly upon a given object.
Version: 2.2.0
Author: Xotic750 [email protected]
License: MIT
Copyright: Xotic750
module.exports
⇒ array ⏏
This method creates an array of all properties (enumerable or not) found directly upon a given object.
Kind: Exported member
Returns: array - An array of strings that correspond to the properties found
directly upon the given object.
Throws:
- TypeError If target is null or undefined.
| Param | Type | Description | | ----- | ------------------- | --------------------------------------------------------------------------------- | | obj | object | The object whose enumerable and non-enumerable own properties are to be returned. |
Example
import getOwnPropertyName from 'get-own-property-name-x';
getOwnPropertyNames('foo'); // ["0", "1", "2", "length"]