collect-property
Collect property over prototype chain.
Install
Download manually or with package-manager.
npm
npm install --save collect-property
Example
var collectProperty = ; // Define constructors with following hierarchy: C -> B -> Avar { thisprop = 'baz';};var { thisprop = 'bar';};Bprototype = ;var { thisprop = 'foo';};Cprototype = ; // Create an instance.var o = ; // Collect all values for the `prop` property.var values = ;// → ['foo', 'bar', 'baz']
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