githubEdit

get-own-enumerable-property-symbols

Returns an array of all enumerable symbol properties found directly upon a given object.

Similar to Object.getOwnPropertySymbolsarrow-up-right but only enumerablearrow-up-right keys.

import getOwnEnumPropSymbols from 'get-own-enumerable-property-symbols'

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

Last updated