Makes a function behaves as a method.
npm install methodize


> Makes a function behaves as a method.
Download manually or with package-manager.
#### npm
```
npm install --save methodize
#### bower
``
bower install --save methodize
`javascript
var methodize = require('methodize');
var person = {
firstName: 'Gaius',
lastName: 'Baltar',
};
function getFullName(person) {
return person.firstName +' '+ person.lastName;
};
// Methodize the function and attaches it to the person object.
//
// The method name is retrieved from the original function if it is a
// named function.
//
// A custom name can be specified as a second parameter to attachTo().
methodize(getFullName).attachTo(person);
// Profit :)
console.log(person.getFullName());
``
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.
ISC © Julien Fontanet