Skip to content

doodlely/numfuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumFuzz.js

Simple number abbreviation library and jQuery plugin.

Usage

NumFuzz.fuzzy(1000); // -> "1k"
NumFuzz.fuzzy(1139); // -> "1.1k"
NumFuzz.fuzzy(1103291); // -> "1.1M"

jQuery Plugin

The library is also wrapped into a jQuery plugin for convenience.

HTML:

<p><span class="abbr-number">8795</span> Followers</p>

JavaScript:

$('.abbr-number').numFuzz();

Will update the DOM to:

<p><span class="abbr-number" title="8795">8.7k</span> Followers</p>

About

JS Library for abbreviating numbers

Resources

License

Stars

Watchers

Forks

Packages

No packages published