1.0.7 • Published 1 year ago

number-abbrevation v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Number Abbrevation

This package helps you represent large numbers in a shorter, more convenient format by using abbreviations such as "k" for thousand and "m" for million. It is especially useful when dealing with financial or statistical data.

Installation

To use Number-Abbreviation in your project, simply install it via npm:

  npm install number-abbrevation

Usage

The formatNumber() function takes a number as input and returns its abbreviated form, with a suffix indicating the order of magnitude. For example:

const numberAbbreviation = require('number-abbrevation');

console.log(numberAbbreviation.formatNumber(1234567)); // Output: 1.2M

The deAbbreviateNumber() function takes an abbreviated number as input and returns its full numeric value. For example:

const numberAbbreviation = require('number-abbrevation');

console.log(numberAbbreviation.deAbbreviateNumber('1K')); // 1000

Features

  • Easy-to-use API that allows you to quickly and easily format large numbers
  • Supports numbers up to the trillions
  • Customizable labels for abbreviations
  • Cross platform
  • MIT License

Contributing

Contributions are always welcome!

If you'd like to contribute to this project, please feel free to fork the repository and submit a pull request. We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements.

Authors

License

This project is licensed under the terms of the MIT license. See the LICENSE file for more information.

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago