Bug: maskValuesOfKeys option mutates object properties!
See original GitHub issueTo Reproduce
import { Logger } from "tslog";
const logger = new Logger();
const password = "123";
const someObj = {
password: "123"
};
logger.info(someObj);
logger.info(password);
console.log(password === "123"); // true
console.log(someObj.password === "123"); // false
Additional context v2.11.1
Node.js Version v14.15.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Mutating Objects: What Can Go Wrong? - commercetools tech
We all know that mutating objects can lead to unwanted side effects, and can introduce hard to trace bugs, and make code hard...
Read more >Why Mutation Can Be Scary - A List Apart
To mutate means to change in form or nature. Something that's mutable can be changed, while something that's immutable cannot be changed.
Read more >Washing your code: avoid mutation - Artem Sapegin
Here we're mutating the original puppy object by changing its age property. Mutations are often problematic. Consider this function:.
Read more >How to Avoid Object Mutation in JavaScript | by Jake Mills
Three Quick Ways to Avoid Mutating Objects in JavaScript ... to use this method to copy all the properties from one object to...
Read more >tslog - Extensible TypeScript Logger for Node.js and Browser ...
Extensible TypeScript Logger for Node.js and Browser: Dependency free, Fully customizable, Pretty errors, stack traces, and JSON output to attachable ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes it works! Thank you.
Oh, I think I got your problem. I’m in the middle of a bigger release anyway, going to fix it as well.