Skip to content

toFloat

Basic usage

The _.toFloat function will do its best to convert the given value to a float.

import { toFloat } from 'radash'
toFloat(0) // => 0.0
toFloat(null) // => 0.0
toFloat(null, 3.33) // => 3.33