* Method that ensures that provided value is a float (and converts it to float if needed). * * @param value The value to convert to float. * @returns value of parameter converted to number or float.
(value: string | number)
| 48 | * @returns value of parameter converted to number or float. |
| 49 | */ |
| 50 | function toFloat(value: string | number): number { |
| 51 | return typeof value === 'number' ? value : parseFloat(value); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * @description |
no outgoing calls
no test coverage detected