String.prototype.replace() problems with JSON.stringify() and serialization of Objects

Boris Zbarsky bzbarsky at MIT.EDU
Mon Jul 28 08:16:29 PDT 2014


On 7/28/14, 11:09 AM, Rick Waldron wrote:
>    var y = x.replace('{{blob}}', function() {
>      return data;
>    });

In fairness, that's the sort of thing that gives off a "WAT smell". 
Code like this without a comment that explains the indirection is just 
asking someone to "simplify" it, breaking it in the process...

-Boris


More information about the es-discuss mailing list