Skip to content

Function takes a float and returns the digits on the right of the decimal

License

Notifications You must be signed in to change notification settings

writetome51/get-right-of-decimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getRightOfDecimal(float): string

Receives float and returns the digits on the right of the decimal.
The digits are returned as a string in order to preserve any zeros at the beginning.

Examples

getRightOfDecimal(-0.0001) --> '0001'

getRightOfDecimal(2.11) --> '11'

Installation

npm i @writetome51/get-right-of-decimal

Loading

import {getRightOfDecimal} from '@writetome51/get-right-of-decimal';

About

Function takes a float and returns the digits on the right of the decimal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published