3 ms·
Looks like JSON.stringify will not reveal a private field, based on this line from the spec: "What do you mean by "encapsulation" / "hard private"? It means th
by lioeters 8y ago
Looks like JSON.stringify will not reveal a private field, based on this line from the spec:
"What do you mean by "encapsulation" / "hard private"? It means that private fields are purely internal: no JS code outside of a class can detect or affect the existence, name, or value of any private field of instances of said class.."
https://github.com/tc39/proposal-class-fields/blob/master/PRIVATE_SYNTAX_FAQ.md#what-do-you-mean-by-encapsulation--hard-private https://github.com/tc39/proposal-class-fields/blob/master/PR...