aboutsummaryrefslogtreecommitdiff
path: root/node_modules/get-own-enumerable-property-symbols/README.md
blob: 102ae8aa7f8c672135eaafa6548da85465741efa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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
const getOwnEnumPropSymbols = require('get-own-enumerable-property-symbols')

getOwnEnumPropSymbols({ [Symbol()]: undefined })
// [Symbol()]
getOwnEnumPropSymbols(Object.defineProperty({}, Symbol(), {enumerable: false}))
// []
```

[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)