Skip to content
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

Add option for stable stringifying to JSON (#90) #91

Merged
merged 1 commit into from
May 23, 2019

Conversation

jorgelf
Copy link
Contributor

@jorgelf jorgelf commented May 2, 2019

The JSON formatter doesn't stringify objects' attributes in a consistent order by default, which is annoying when reading them.

Now we accept a new parameter for that formatter, stable, which when true results in using the fast-safe-stringify.stableStringify function, that stringifies attributes in alphabetical order.

README has been updated as well.

Closes #90

Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. Thanks for the PR!

@DABH DABH merged commit ec7d624 into winstonjs:master May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON formatter doesn't stringify attributes in a consistent order
2 participants