If provided null or undefined, the function returns an empty object.
In contrast to the built-in Object.getOwnPropertyDescriptors(), this function returns an empty object if provided undefined or null, rather than throwing an error.
throws
second argument must be a positive integer
Parameters
value: any
input object
Optional level: undefined | number
inheritance level
Returns
Object
inherited property descriptors
Example
var desc = inheritedPropertyDescriptors( [] );
// returns {...}
Returns an object's inherited property descriptors.
Notes
null
orundefined
, the function returns an empty object.Object.getOwnPropertyDescriptors()
, this function returns an empty object if providedundefined
ornull
, rather than throwing an error.second argument must be a positive integer