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

[Client] Create function to format bundle size strings #1000

Closed
Tracked by #741
nicholas-codecov opened this issue Jan 5, 2024 · 0 comments · Fixed by codecov/gazebo#2487
Closed
Tracked by #741

[Client] Create function to format bundle size strings #1000

nicholas-codecov opened this issue Jan 5, 2024 · 0 comments · Fixed by codecov/gazebo#2487
Assignees

Comments

@nicholas-codecov
Copy link

nicholas-codecov commented Jan 5, 2024

We need to create a function that will format the byte sizes that are returned from the API. We can also utilize the JS Intl.NumberFormat() API to help us out here, see list of possible units here.


The basic logic for this function is as follows:

  • Size is less then 1 Kb
    • Display size in bytes
  • Size is less then 1 Mb
    • Display size in kilobytes
  • Size is less then 1 Gb
    • Display size in megabytes
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 a pull request may close this issue.

1 participant