I am using ES6 classes. I want to be able to do this:
function Car(color) { this.color = color; }; Car.prototype.getColor = require(\'./getColor\');
If you are interested, I've developed a little module to bind functions with various number of parameters to class methods: https://github.com/ngryman/to-method.
const toMethod = require('to-method'); function Car(color) { this.color = color; } toMethod(Cat, { getColor: require('./getColor') });