npm.io
2.0.2 • Published 5 years ago

@writetome51/get-right-of-decimal

Licence
MIT
Version
2.0.2
Deps
2
Size
3 kB
Vulns
0
Weekly
0

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';

Keywords