@jsojibcript/num-abbr
v1.0.1
Published
A npm package for abbreviating large numbers.
Downloads
3
Maintainers
Readme
num-abbr
A npm package for abbreviating large numbers.
Installation
You can install the package via npm:
npm install num-abbr
Usage
const { useNumberAbbreviation } = require('num-abbr');
console.log(useNumberAbbreviation(1000)); // Output: "1k"
import { useNumberAbbreviation } from 'num-abbr';
console.log(useNumberAbbreviation(1000)); // Output: "1k"
API
useNumberAbbreviation(value: number): string
Abbreviates a large number into a more readable format.
-value
: The number to be abbreviated.
-Returns
: The abbreviated string representation of the number.