-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
Consistent formatting of examples (return values) #3335
Comments
What is (in your opinion) the expected formatting for:
|
How should it be implemented:
|
When should we use a newline for long string results?
Please note that we cannot take the producing code ( |
I would expect similar formatting to the Node REPL |
How should we display Dates/prototype based objects?
|
> new Date()
2024-12-28T19:10:27.442Z
> 'foobar'
'foobar'
> ['test','a']
[ 'test', 'a' ]
> { foo:'bar', 'a':1}
{ foo: 'bar', a: 1 } Looks pretty similar to what we have already 👍 |
Continuation of #3287
The examples are inconsistently formatted, both in our source code and when running the refresh on the website.
faker/src/modules/finance/index.ts
Lines 126 to 128 in 00be2e1
faker/src/modules/finance/index.ts
Lines 971 to 972 in 00be2e1
faker/src/modules/food/index.ts
Line 43 in 3c7abb5
faker/src/modules/helpers/index.ts
Line 821 in 3c7abb5
faker/src/modules/helpers/index.ts
Line 619 in 3c7abb5
Also some examples seem to refer to old parameter defaults or locale data as well.
We should define a function that formats our examples consistently.
Potentially automatically via script.
The text was updated successfully, but these errors were encountered: