1.0.2 • Published 10 months ago

fixdecimal v1.0.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
10 months ago

fixDecimal

example

//Rounding to given decimal digits

const yourFloatNumber=1234.3461045234;
const result=fixdecimal(yourFloatNumber,4); // Output: 1234.3461

Overview

The fixdecimal package will help you to fix your digits after decimal point.

Installation

To install the fixdecimal package, you can use the following npm command:

npm install fixdecimal

Usage

Here is the basic example of using the fixdecimal package:

//first parameter is your number and the second parameter is how many digits you want after decimal.

 const fixdecimal=require('fixdecimal');
 const yourFloatNumber=187634.347654334;
 const result=fixdecimal(yourFloatNumber,2); // Output: 187634.34
1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago