descriptors
v1.0.4
Published
Like Object.getOwnPropertyDescriptor, but goes along the prototype chain and gets the descriptors for all properties.
Downloads
33
Maintainers
Readme
descriptors
Like Object.getOwnPropertyDescriptor
, but goes along the prototype chain and gets the descriptors for all properties.
-- Usage
const descriptors = require('descriptors')
descriptors({ a: 'a', b: 'b' })
/*
{
a: {
value: 'a',
writable: true,
enumerable: true,
configurable: true
},
b: {
value: 'a',
writable: true,
enumerable: true,
configurable: true
}
}
*/