node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

enumerable-prop

enumerable-prop

Make a class enumerable with a common-case iterator

Build Status

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

Documentation

License

MIT

Tests

npm test