0.1.3 • Published 12 years ago
enumerable-prop v0.1.3
enumerable-prop
Make a class enumerable with a common-case iterator
Example
var enumerableProp = require('enumerable-prop');
function Klass() {
// Add `this.list`
enumerableProp(this);
// Or `this.messages` instead
enumerableProp(this, {prop: 'messages'});
}
Installation
NPM
npm install enumerable-prop
component
component install codeactual/enumerable-prop
API
create()
Return a new EnumerableProp instance.
License
MIT
Tests
npm test