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

Add spaceSeparatedCurrency config option #422

Closed
wants to merge 0 commits into from
Closed

Add spaceSeparatedCurrency config option #422

wants to merge 0 commits into from

Conversation

anna-sunberg
Copy link
Contributor

@anna-sunberg anna-sunberg commented Apr 17, 2019

Add spaceSeparatedCurrency so that it would be possible to have space separated abbreviation but no space after prefixed currency e.g. $10 k

Fixes #423

@BenjaminVanRyseghem
Copy link
Owner

Thanks for the PR.

Could you change your code so that spaceSeparatedCurrency defaults to spaceSeparated when not specified, so that we can ensure backward compatibility

Something like

spaceSeparatedCurrency = spaceSeparatedCurrency !== void 0 ? spaceSeparatedCurrency : spaceSeparated;

Note: void 0 is the most correct way to refer to undefined as undefined could be locally shadowed

Could you also add a set of tests specific to this feature (I haven't seen them at least 😄)?

Finally, could you add yourself to then AUTHORS file as well as a line in the CHANGELOG?

Thanks again!

@anna-sunberg
Copy link
Contributor Author

Added the fallback logic and a couple of tests.

Can't add language tests because there's no way to pass that configuration to the old format (although it works in numeral so it shouldn't be impossible to achieve).

@BenjaminVanRyseghem
Copy link
Owner

Hi :)

despite what GitHub is saying (I quite fucked up while rebasing 😄) your PR has been merged 😄

Thanks again

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 this pull request may close these issues.

No way to have space separated abbreviation and not-separated currency symbol at the same time
2 participants