Number Label
Convert a large number to nice formatted string.
Features
- No dependencies
- Easy to Use
- Use the International System of Units (SI)
Installation
Module available through the
npm registry. It can be installed using the
npm
or
yarn
command line tools.
# NPM npm install numberlabel --save# Or Using Yarn yarn add numberlabel
Usage
const label = //Amountslabelamounts //[{pow, name, symbo, prefix... //Convert(number, type[prefix, symbol, prefix], {start: 0, toFixed: 2})label //''1.57 Million'label //'1.27M'label //'1.57 Mega' label //'100'label //'1.0000'label //'7.0000 Hecto' label //'1.01 Thousandth' //getLabel(number, {start: 0, toFixed: 2, type: type[prefix, symbol, prefix]})label //{number:'1.00', pow: 2,...
Tests
To run the test suite, first install the dependencies, then run test
:
# NPM npm test# Or Using Yarn yarn test
Dependencies
None
Related
- bytelabel: convert byte lengths into a nice formatted string
Contributors
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. List of all contributors.