get-own-property-names-x

Creates an array of all properties (enumerable or not) found directly upon a given object.

Usage no npm install needed!

<script type="module">
  import getOwnPropertyNamesX from 'https://cdn.skypack.dev/get-own-property-names-x';
</script>

README

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

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 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exportsarray

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"]