1.0.4 • Published 8 years ago
descriptors v1.0.4
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
}
}
*/