View Source Idmlx.Utils.Normalizer (idmlx v0.2.1)
A utility module for normalizing string values into their respective types.
Summary
Functions
Normalizes a given value by converting it to an integer, float, or boolean if possible.
Functions
Normalizes a given value by converting it to an integer, float, or boolean if possible.
Parameters
- value: The value to be normalized. It can be a string representing an integer, float, or boolean.
Examples
iex> Normalizer.normalize_value("123")
123
iex> Normalizer.normalize_value("123.45")
123.45
iex> Normalizer.normalize_value("true")
true
iex> Normalizer.normalize_value("some string")
"some string"