reflect-own-keys-x
v3.1.2
Published
Sham for Reflect.ownKeys
Downloads
1,778
Maintainers
Readme
reflect-own-keys-x
Sham for Reflect.ownKeys
module.exports
⇒ Object ⏏
This method returns an array of the target object's own property keys. Its return value is equivalent to Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target)).
Kind: Exported member
Returns: Object - An Array of the target object's own property keys.
Throws:
- TypeError If target is not an Object.
| Param | Type | Description | | ------ | --------------- | ------------------------------------------------- | | target | * | The target object from which to get the own keys. |
Example
import reflectOwnKeys from 'reflect-own-keys-x';
reflectOwnKeys({a: 1, b: 2}); // ['a', 'b']