collect-property
Collect property over prototype chain.
Install
Download manually or with package-manager.
npm install --save collect-property
Example
var collectProperty = require('collect-property');
var A = function () {
this.prop = 'baz';
};
var B = function () {
this.prop = 'bar';
};
B.prototype = new A();
var C = function () {
this.prop = 'foo';
};
C.prototype = new B();
var o = new C();
var values = collectProperty(o, 'prop');
Contributions
Contributions are very welcomed, either on the documentation or on
the code.
You may:
- report any issue
you've encountered;
- fork and create a pull request.
License
ISC © Julien Fontanet