
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
numberformat
Advanced tools
Based on jquery-numberformatter, without dependency on jquery, formats numbers based on a formatting string and a locale.
Port from jquery.numberformatter, without parsing function and without dependency on jquery or jshashtable.
Originally written by Michael Abernethy (mike@abernethysoft.com), Andrew Parry (aparry0@gmail.com)
Licensed under the MIT (MIT-LICENSE.txt)
lodash.assign
formatNumber(numberString, options) - Takes a plain number as a string (e.g. '1002.0123') and returns a string of the given format options.
To achieve the old way of combining parsing and formatting to keep say a input field always formatted to a given format after it has lost focus you'd simply use a combination of the functions.
e.g.
$("#salary").blur(function(){
$(this).parseNumber({format:"#,###.00", locale:"us"});
$(this).formatNumber({format:"#,###.00", locale:"us"});
});
The syntax for the formatting is:
0 = Digit
# = Digit, zero shows as absent
. = Decimal separator
- = Negative sign
, = Grouping Separator
% = Percent (multiplies the number by 100)
For example, a format of "#,###.00" and text of 4500.20 will display as "4.500,20" with a locale of "de", and "4,500.20" with a locale of "us"
FAQs
Based on jquery-numberformatter, without dependency on jquery, formats numbers based on a formatting string and a locale.
We found that numberformat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.