JSON.prune
JSON.prune copied to clipboard
support getters/setters
class MyClass {
get value() {
return "wow"
}
};
const myClass = new MyClass();
console.log(JSON.prune(myClass)); // empty object {}
Would that really be better ? I'd take opinions on that.
Would that really be better ? I'd take opinions on that.
Probably would be a great option... as a workaround, I'm just using toJSON on my objects