node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

methood

methood Build Status

create methods the bad way.

var methood = require('methood');
 
function Dog(){
    var method = methood(this);
 
    method('speak', 'bark');
    method('bark', function(){
        console.log('ugh whatever');
    });
    
    method(['fetch', 'getitnow'], function(){
        console.log('ugh whatever');
    });
}
 
var captainSnuggles = new Dog();
captainSnuggles.speak();
captainSnuggles.bark();
captainSnuggles.fetch();
captainSnuggles.getitnow();