summaryrefslogtreecommitdiff
path: root/src/utils/simpleFormat.ts
blob: 45647784949e9db67a67051345056baccbc3e19e (plain) (blame)
1
2
3
4
5
6
7
8
9
/**
* @name simpleFormat
* @param {number|string} value Value to format
* @returns {number} A number in fixed-point notation up to 2 decimal points
*/
module.exports = (value: string) => {
    const result = parseFloat(parseFloat(value).toFixed(2));
    return result;
};