1.0.1 • Published 2 years ago

zero-to-billion v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Number Formatter

npm version

A lightweight npm module to format large numbers with suffixes.

Installation

Install the package via npm:

Usage

In your JavaScript or TypeScript file, import the zeroToBillion function from the package:

const { zeroToBillion } = require('zero-to-billion');
// or
import { zeroToBillion } from 'zero-to-billion';

console.log(zeroToBillion(500)); // Output: 500
console.log(zeroToBillion(1500)); // Output: 1.5K
console.log(zeroToBillion(1200000)); // Output: 1.2M
console.log(zeroToBillion(3500000000)); // Output: 3.5B
1.0.1

2 years ago

1.0.0

2 years ago