An elegant OOP with mixins + AOP for JavaScript.


Version 2.x

dcl.collectPropertyDescriptors() is partially modeled after Object.getOwnPropertyDescriptors(). The difference is that the latter retrieves all own property descriptors, while the former collects all property descriptors through an inheritance chain, and fills with them the supplied object.


dcl.collectPropertyDescriptors() takes two parameters:

  • props - the object to add property descriptors to.
  • obj - the object to inspect.

For convenience, the utility returns props.