0.1.3 • Published 11 years ago

enumerable-prop v0.1.3

Weekly downloads
3
License
-
Repository
github
Last release
11 years ago

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

create()

Return a new EnumerableProp instance.

License

MIT

Tests

npm test