• I wouldn't expect toLocaleString to be part of the Object.prototype since there's no local in Espruino, but I found it weird propertyIsEnumerable and isPrototypeOf are not implemented.

    A quick and dirty solution would be the following:

    Object.prototype.propertyIsEnumerable=fu­nction(p){for(var k in this)if(k==p)return this.hasOwnProperty(k);return false};
    Object.prototype.isPrototypeOf=function(­o){return o instanceof this.constructor};
    

    However, instanceof is also broken in Espruino. Above code uses the constructor but a proper check would be the equivalent of the following:

    Object.prototype.isPrototypeOf=function(­o){
      function F() {}
      F.prototype = this;
      return o instanceof F;
    };
    
    // this should be true
    Object.prototype.isPrototypeOf({});
    

    Latter check is false but it should be true. Ideally, isPrototypeOf and propertyIsEnumerable should be implemented natively.

    Last question for now, I'v enoticed that RegExp and in general regular expression /syntax/ is not implemented. Is that too big to bring in natively or it's something planned already?

    Thanks

About