Sacha
Thanks, but I was hoping for something a bit more like 'new'
Imagine I want three date objects. I guess I'd have to write
x=require('date');
d1=x.connect(); d2=x.connect();
It's not very elegant, IMHO :)
There's also the problem of passing constructors.
d=require('date'.connect(args)
I think I can do this using 'apply' inside the 'connect'' function but I'm not sure how exactly it would look.
Martin
@mgg1010 started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Sacha
Thanks, but I was hoping for something a bit more like 'new'
Imagine I want three date objects. I guess I'd have to write
x=require('date');
d1=x.connect();
d2=x.connect();
It's not very elegant, IMHO :)
There's also the problem of passing constructors.
d=require('date'.connect(args)
I think I can do this using 'apply' inside the 'connect'' function but I'm not sure
how exactly it would look.
Martin