mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
16 lines
820 B
Markdown
16 lines
820 B
Markdown
|
# get-own-enumerable-property-symbols [![Build Status](https://travis-ci.org/mightyiam/get-own-enumerable-property-symbols.svg?branch=master)](https://travis-ci.org/mightyiam/get-own-enumerable-property-symbols)
|
||
|
|
||
|
Returns an array of all *enumerable* symbol properties found directly upon a given object.
|
||
|
|
||
|
Similar to [`Object.getOwnPropertySymbols`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols)
|
||
|
but only [enumerable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) keys.
|
||
|
|
||
|
```js
|
||
|
import getOwnEnumPropSymbols from 'get-own-enumerable-property-symbols'
|
||
|
|
||
|
getOwnEnumPropSymbols({ [Symbol()]: undefined })
|
||
|
// [Symbol()]
|
||
|
getOwnEnumPropSymbols(Object.defineProperty({}, Symbol(), {enumerable: false}))
|
||
|
// []
|
||
|
```
|