• @gadicc - your solution looks good, but I don't know what it would look like inside the module source. "connect" is usually declared as a function member of 'exports' and I suspect declaring the date constructor as "exports.connect = function.." might stop it being a date constructor...

    Ah, someone at my work has said that if I declare the date as normal

    Date = function ()...

    Then put a line like this

    exports.Date=Date;

    Then I can use it like this

    Date = require('date').Date;

    var d1 = new Date();

    I'll test this approach soon...

    Martin

    Martin

About

Avatar for mgg1010 @mgg1010 started