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
...OwnPropertySymbols");module.exports=Object.getOwnPropertySym...
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?
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 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.
uhm ... OK, thanks for the info. If I load it manually I get this error:
And looking at "official" modules I see
module
is never used, onlyexports
is.It is quite common in
npm
-land tomodule-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?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.
Thanks