• Why would you use a .connect() function / method to create a Rodrigues instance?

    I know hat this pattern is typical for connecting devices. But in this case, it is just a transformer, isn't?

    To return a constructor function in a require, just set the exported object to it: exports = Rodrigues;.

    If you want to stick with the pattern, you can return exports.getInstance = function() { return new Rodrigues(); } to provide a self documenting function.

About

Avatar for allObjects @allObjects started