GitHub - FallenTech/meteor-numscale: Meteor package for displaying big numbers with suffixes | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

FallenTech/meteor-numscale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumScale

Build Status

A Meteor package for converting numbers into pretty strings with suffixes to indicate scale (Kilo, Million, Billion, etc). Makes it super easy to display pretty numbers in your Meteor project.

Direct API Examples

> NumScale.scale({value: 1000000000, maxLen: 5, powerOf: 10});
'1G'

> NumScale.scale({value: 1073741824, maxLen: 5, powerOf: 2});
'1G'

> NumScale.scale({value: 654345443, maxLen: 6});
'654.3M'

> NumScale.scale({value: 43322466, maxLen: 7, powerOf: 2});
'41.316M'

Template Helper

{{numScale <value> <maxLen> <powerOf>}}
{{numScale 1000000000 5 10}}

Usage:

The scale() method takes an object argument. The members of the argument object are as follows:

  • value (required) - the number to be scaled and formatted
  • powerOf (optional) - either 2 or 10: sets scaling factor (defaults to 10)
  • maxLen (optional) - maximum length of the string to be returned (default 20)

'value' must be a non-negative positive integer within the safe JavaScript range.

About

Meteor package for displaying big numbers with suffixes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.