You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a super weird issue. I have this object that is has computed keys. I have things that I want to highlight in this object so it has chalk colors on some keys. This works great. My object
Because the .stringify function decodes binary characters into their ASCII literal escapes - such as "\u001b" instead of the Unicode character.
Basically, don't do this. This isn't how Chalk is intended to be used, as you should be stripping your inputs to JSON.stringify() - not the outputs.
General rule of thumb: If you're post-processing output based on the input, that's almost guaranteed code smell and you should probably re-think your application logic.
Just strip your inputs to JSON.stringify() - or better yet, don't use chalk on any of the strings at all ;)
I'm having a super weird issue. I have this object that is has computed keys. I have things that I want to highlight in this object so it has chalk colors on some keys. This works great.
My object
I want to print these values to a file and would like to strip the ANSI. However, the strip function does not seem to be working.
Here is what I'm using to print to file.
The output looks like this
I did some debugging and the string checks in strip-ansi seem to be working. I thought you might have a better idea of what exactly is happening.
Thanks!
The text was updated successfully, but these errors were encountered: