Created
February 29, 2016 11:24
-
-
Save nire0510/f88482ad3b0e13f8f6c4 to your computer and use it in GitHub Desktop.
Ember helper: rounds number to specified floating point format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export function roundNumber(params/*, hash*/) { | |
| return parseInt(params[0]).toFixed(params[1] || 0); | |
| } | |
| export default Ember.Helper.helper(roundNumber); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment