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

format How to not carry #706

Open
supermars01 opened this issue Jan 11, 2021 · 2 comments
Open

format How to not carry #706

supermars01 opened this issue Jan 11, 2021 · 2 comments

Comments

@supermars01
Copy link

numeral(1.235).format('0.00') = 1.24 How to translated into 1.23

@BenjaminVanRyseghem
Copy link

in numbro, you could use:

numbro(1.235).format({
  average: true,
  mantissa: 2,
  roundingFunction: Math.floor
})

discloruse: I am the numbro author

@supermars01
Copy link
Author

in numbro, you could use:

numbro(1.235).format({
  average: true,
  mantissa: 2,
  roundingFunction: Math.floor
})

discloruse: I am the numbro author

thank you!

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

No branches or pull requests

2 participants