What if you declare b in line 22 var b = require('b').create();, does it make a difference?
No, but a mix version of es6 and stable like this works:
// es6 code version Modules.addCached("b",(()=>{ var _b, // b = () => {_b = this;}, b = function() {_b = this;}, // <--- pb = b.prototype; pb.sqrt = (a) => {return _b._sqrt(a);}; pb._sqrt = (a) => {return Math.sqrt(a);}; exports.create = () => { return new b();}; })); b = require('b').create(); console.log(b.sqrt(3));
I guess it's a special constellation of arrow function usage that causes the interpreter to fail.
@MaBe 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.
No, but a mix version of es6 and stable like this works:
I guess it's a special constellation of arrow function usage that causes the interpreter to fail.