I\'m trying to store an object in redis, which is an instance of a class, and thus has functions, here\'s an example:
function myClass(){ this._attr = \"
it looks like you attempt to stringify a closed function. you can use ()=>{} to solve the scope problem.
function myClass(){ this._attr = "foo"; this._accessCounts = 0; this.getAttr = ()=>{ this._accessCounts++; return this._attr; } this.getCount = ()=>{ return this._accessCounts; } }