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
BREAKING(fmt/bytes): rename prettyBytes to format #2896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes LGTM minus my comment. @kt3k is this a name change that we want to make?
fmt/bytes.ts
Outdated
@@ -17,7 +17,7 @@ type LocaleOptions = { | |||
}; | |||
|
|||
/** | |||
* The options for pretty printing the byte numbers. | |||
* @depreacted (will be removed after 0.170.0) use `FormatOptions` instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is spelled incorrectly in a few places:
* @depreacted (will be removed after 0.170.0) use `FormatOptions` instead | |
* @deprecated (will be removed after 0.170.0) use `FormatOptions` instead |
The rename seems like a good idea to me. Consistency is best |
The renaming would make the |
I'm now slightly in favor of this change as 'format' sounds like a more appropriate name for standard modules than 'prettyBytes'. |
+1 on the name change, feels a lot more "standard module" and it has the bonus of being closer to web naming specs. |
Looks like we are all supportive to this. @timreichen Thanks for your suggestion! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
prettyBytes
toformat
prettyBytes
PrettyBytesOptions
toFormatOptions
PrettyBytesOptions
This is a change in an effort to have the two std formatting mods
fmt/bytes
andfmt/duration
(#2871) have similar naming schemes inspired by existing web apis (https://github.com/tc39/proposal-intl-duration-format).