JSON.prune icon indicating copy to clipboard operation
JSON.prune copied to clipboard

support getters/setters

Open cyan-2048 opened this issue 2 years ago • 2 comments

class MyClass {
	get value() {
		return "wow"
	}
};

const myClass = new MyClass();

console.log(JSON.prune(myClass)); // empty object {}

cyan-2048 avatar Nov 20 '23 16:11 cyan-2048

Would that really be better ? I'd take opinions on that.

Canop avatar Nov 20 '23 17:11 Canop

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

cyan-2048 avatar Nov 22 '23 02:11 cyan-2048