-
-
Notifications
You must be signed in to change notification settings - Fork 278
Add .isSpinning
property
#73
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
Conversation
I'm wondering, if we name it |
@SamVerschueren Why can only methods have the |
I'm fine with either though, I think it's more personal preference. Which is the case in programming almost all the time :). |
Cool! Name aside, is the code reasonable? Anything that I need to change? |
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.
Needs some docs to. Code looks good.
@SamVerschueren updated! |
readme.md
Outdated
@@ -131,6 +131,10 @@ Stop the spinner, change it to a yellow `⚠` and persist the current text, or ` | |||
|
|||
Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance. | |||
|
|||
#### .isSpinning | |||
|
|||
Returns a boolean that describes whether the instance is currently spinning. |
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.
By using the Returns
word, it looks like it's a function returning something. Should we rather use something like
Retrieve the status of the spinner.
Short but describes what it does.
Or just leave it as is. This is really nitpicking :).
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.
Especially because the other functions end in parens, it's clear to me that this is a property not a function. Happy to change if you want, but if it were my choice I'd leave it. ¯\_(ツ)_/¯
Thought about expanding
isSpinning
to besince it can't be spinning if it's not enabled, but wasn't sure about the implications. That would simplify the check in
start()
to beif (this.isSpinning)