If you create an object, e.g.
const o = {
name: 'John Smith',
password: 'hunter1'
};
and write this to an white-out stream, than the output is correct, but the underlying object is changed as well:
wo.write(o);
console.log(o.password); // XXXXXXX instead of hunter1
This is if you use a censor mode for 'password'. If you try 'remove' than the property of the underlying object is removed. This should not be the desired behavior with streams.
If you create an object, e.g.
and write this to an white-out stream, than the output is correct, but the underlying object is changed as well:
This is if you use a censor mode for 'password'. If you try 'remove' than the property of the underlying object is removed. This should not be the desired behavior with streams.