-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outputJson does not preserve the object for asynchronous processing #702
Comments
Yes, this is normal. If you're mutating an object, behavior will not be predictable. |
In most asynchronous use cases i can imagine, you would want to use the stringification, to preserve the object, instead of copying it first (closure), then stringify it and then dumping it. In my opinion, it seems contra intuitive, and sort of defeats the purpose, of having a function to replace fs.outputFile(fileName, JSON.stringify(object) ) I wish you would reconsider. |
How does |
|
fs-extra
version:8.1.0When writing object asynchronously with outputJson, the object is not preserved, before the promise is returned.
Example:
The text was updated successfully, but these errors were encountered: