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
Hi! Could you add format objects in new alternative way as additional option?
I think that a lot of people will want to format object in another way as is it shown in above example.
As you can see, anotherObject values in new, alternate way will be format in one column.
Spaces will be automatically added between keys and values to make that looks very easy-readable > code. Algorith to realise that is very easy, but effects will be amazing :)
I hope to get answer. :)
Iterate over keys and values in object and search the longest key.
Range again over object and as many spaces after key, as excepted - result of equation:
(longest key length + white space) - (actual value length). Then show value.
Environment
OS: Ubuntu
New additional setting example
{
alternative_object_format: true/false
}
The text was updated successfully, but these errors were encountered:
Oh. Now I can see that code in post has been destroyed. Please, check difference on following screenshot:
As you can first two objects, they are more readable than the 'default' one.
It is very helpful if there are bigger objects (more than 5 keys) with different lengths.
Description
Input
The code before:
Expected Output
The code should have looked like this after alternative beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
Iterate over keys and values in object and search the longest key.
Range again over object and as many spaces after key, as excepted - result of equation:
(longest key length + white space) - (actual value length). Then show value.
Environment
OS: Ubuntu
New additional setting example
{
alternative_object_format: true/false
}
The text was updated successfully, but these errors were encountered: