Urara-Blog/node_modules/.pnpm-store/v3/files/28/0b0e64caa60ad20aba6c2902fd7bd273033fe25accfdf114eb4898dcba76d1fcc28b9d7ecfc22523ada07165648c292b014333e393d6d4ea76abde12529d00
2022-08-14 01:14:53 +08:00

15 lines
820 B
Text

# 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}))
// []
```