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 reversed usage zm #2

Closed
JoschuaSchneider opened this issue Oct 7, 2021 · 4 comments · Fixed by #3
Closed

Add reversed usage zm #2

JoschuaSchneider opened this issue Oct 7, 2021 · 4 comments · Fixed by #3
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@JoschuaSchneider
Copy link
Owner

The current mz implementation allows creating a formatter function bound to a number like this:

const formatter = mz(5)
formatter`number is {singular|plural}`
formatter`value of number is $value`

This is useful when you have one number that you need to use for multiple formatted strings. But you might also need one set string formatted to different numbers like this (I propose the name zm for this):

const template = zm`number is {singular|plural}`
template(5)
template(0)
@JoschuaSchneider JoschuaSchneider added enhancement New feature or request good first issue Good for newcomers labels Oct 7, 2021
@menghif
Copy link
Contributor

menghif commented Oct 7, 2021

Hi, I would like to work on this!

@JoschuaSchneider
Copy link
Owner Author

Aweome! Go for it :)

@JoschuaSchneider
Copy link
Owner Author

@menghif are you still interested in implementing this?

@menghif
Copy link
Contributor

menghif commented Oct 9, 2021

Yes, I’m on it today! It’s been a busy week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants