Wondering what’s next for npm?Check out our public roadmap! »

get-own-enumerable-property-symbolsTypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

get-own-enumerable-property-symbols Build Status

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

Similar to Object.getOwnPropertySymbols but only enumerable keys.

import getOwnEnumPropSymbols from 'get-own-enumerable-property-symbols'
 
getOwnEnumPropSymbols({ [Symbol()]: undefined })
// [Symbol()]
getOwnEnumPropSymbols(Object.defineProperty({}, Symbol(), {enumerable: false}))
// []