Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
angular-bignumber
Advanced tools
This is an Angular module that is made with purpose of converting integers to their big number equivalent for english, japanese and russian languages respectively. This module serves the angular service and filter using an angular provider.
Right now this module supports english, japanese and russian languages only. Although integrating some other language can be done pretty easily buy just changing NUMBER_SUFFICES variable in source code.
For Example:
Important:
{
pow : power,
val : 'symbol'
}
<script src="./dist/bignumber.js"></script>
As usual, include this file after the inclusion of the angular.min.js file.
angular.module( "TestApp", [ "bignumber" ] );
In HTML Binding
{{ number | bignumber : fractionSize : lang }}
In JavaScript
// as a filter
$filter('bignumber')(number, fractionSize, lang);
// OR as a service
bignumber(number, fractionSize, lang);
Here
lang ~ {ru, ja, en, ......} // FOR Russian, Japanese or English respectively, default will be 'en' i.e. English. fractionSize ~ fraction size // Number of decimals places that is intended after conversion i.e. For fractionSize of 0 gives 15K and fractionSize of 2 will give 15.00K, default will be 0.
Now open your HTML and everything should be working as intended.
Bug reports and pull requests are welcome.
FAQs
Converting large numbers into abbreviated strings
The npm package angular-bignumber receives a total of 1 weekly downloads. As such, angular-bignumber popularity was classified as not popular.
We found that angular-bignumber 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.