uhm ... OK, thanks for the info. If I load it manually I get this error:
ncaught Error: Field or method "exports" does not already exist, and can't create it on undefined
at line 4 col 428
And looking at "official" modules I see module is never used, only exports is.
It is quite common in npm-land to module-exports = ... so that you can just require what's exported. It looks like in Espruino this pattern is not allowed: any specific reason for that?
module-exports = ...
Back to the fragmentation quick chat we had on twitter few days ago, having a different way to export for Espruino only would be somehow weird for most modules.
I understand not every module will or should run in here, but I've been coding small modules since about ever and I'm curious to see what works here and how well.
© Espruino, powered by microcosm.
Report a problem