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

Suggestion "noTilde" option #32

Closed
fega opened this issue Dec 13, 2018 · 7 comments · Fixed by #42
Closed

Suggestion "noTilde" option #32

fega opened this issue Dec 13, 2018 · 7 comments · Fixed by #42

Comments

@fega
Copy link

fega commented Dec 13, 2018

to avoid printing "~" in te beginning when you dont want it.

what do you think? I can send a PR.

@jimutt
Copy link

jimutt commented Jan 29, 2019

This would be a much appreciated feature

@milesj
Copy link

milesj commented Feb 9, 2019

prettyMs(time).replace('~', '')?

@jimutt
Copy link

jimutt commented Feb 9, 2019

@milesj Of course, that's what I'm doing, but it it feels like something that could fit as an option though.

@sindresorhus
Copy link
Owner

I don't think it's should be a separate option, since it only applies to the compact option. And noTilde is a bad option name as it's a double-negative.

I'm just wondering whether we should either remove the tilde by default or change the compact option to also accept: {compact: 'no-tilde'}.

@fega
Copy link
Author

fega commented Feb 10, 2019

@sindresorhus I like the idea of remove the tilde.

@jimutt
Copy link

jimutt commented Feb 11, 2019

Yes, removed by default seems most reasonable to me. I'd rather let the user add it manually if needed. I can think of many contexts where an automatically added tilde is unwanted/makes little sense formatting wise. But if you'd like to keep the funcitonality whithin the library I personally think that it'd be more suitable as an opt-in, through the options object, rather than opt-out. Though that would mean a major version bump, so perhaps {compact: 'no-tilde'} is a better alternative if you want to avoid that.

@sindresorhus
Copy link
Owner

Alright. Let's just remove if. If someone complains we can consider adding a no-tilde option value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants