I have a commonJS module that looks more or less like this.
function MyModule() { this.property = 0; this.myFunction = this.myFunction.bind(this); } MyModule.prototype.myFunction = function() { this.property = 1; // or whatever. }; module.exports = MyModule;This results in a fatal error (bind is not a function). When I log the object on IOS I see that this.myFunction == "<KrollCallback: 0xa871a80>" Clearly this poor excuse for a function does not have a bind method. My question is, is there anyway for prototype functions in commonJS modules to just be javascript functions?