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

pretty-format #1

Open
jamiebuilds opened this issue Feb 16, 2017 · 4 comments
Open

pretty-format #1

jamiebuilds opened this issue Feb 16, 2017 · 4 comments

Comments

@jamiebuilds
Copy link

jamiebuilds commented Feb 16, 2017

Hey, I wrote a package a little while back called pretty-format. I was wondering if you'd seen it and if there was something it does not do you wish it did.

https://github.com/facebook/jest/tree/master/packages/pretty-format

@queckezz
Copy link
Owner

Oh this looks rad! No I haven't actually seen it. It also seems like it does support symbols and weak maps/sets which mine currently does not. Def. could have saved some time

@jamiebuilds
Copy link
Author

Haha, yeah– discovery can be a hard problem.

I'd love to see what you think of it some more. I focused a lot on trying to make it really performant (currently faster than V8's JSON.stringify and node's debug inspect). Also supporting all the possible types and having very consistent output (for use in Jest's snapshots).

@queckezz
Copy link
Owner

queckezz commented Feb 17, 2017

I see that you put in a lot of thought into it. For example, you defer coloring until later so you can test the output. My primary goal was just to display small json compatible objects to the screen and have them colored for things like http response bodies.

However, one thing thats missing for me in pretty-format is to be able to have more customization regarding the styling/color. In fmt-obj you can differentiate between a bunch of different tokens like punctuation, literals numbers, strings etc. Not sure if that's the scope of the package though.

Also added (2b56739) pretty-format to the readme now. ✨

@jamiebuilds
Copy link
Author

We can definitely work on pretty-format to support what you're suggesting if you would like

Repository owner deleted a comment from jimga150 Mar 1, 2024
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

No branches or pull requests

2 participants