nl_tokens: * @package Number @dependency core @description Number formatting rounding ( with precision ) and ranges . Aliases to Math methods .
pl_tokens: function abbreviateNumber ( num , roundTo , str , mid , limit , bytes ) { var fixed = num . toFixed ( 20 ) , decimalPlace = fixed . search ( / \. / ) , numeralPlace = fixed . search ( / [1-9] / ) , significant = decimalPlace - numeralPlace , unit , i , divisor ; if ( significant > 0 ) { significant -= 1 ; } i = math . max ( math . min ( ( significant / 3 ) . floor ( ) , limit === false ? str . length : limit ) , - mid ) ; unit = str . charAt ( i + mid - 1 ) ; if ( significant < - 9 ) { i = - 3 ; roundTo = significant . abs ( ) - 9 ; <mask> = str . slice ( 0 , 1 ) ; } divisor = bytes ? ( 2 ) . pow ( 10 * i ) : ( 10 ) . pow ( i * 3 ) ; return ( num / divisor ) . round ( roundTo || 0 ) . format ( ) + unit . trim ( ) ; }