1.0.1 • Published 1 year ago

@jsojibcript/num-abbr v1.0.1

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

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.