Converts value into doubles or returns 0 when conversion is not possible.
the value to convert.
double value or 0 when conversion is not supported.
Converts value into integer or returns default value when conversion is not possible.
the value to convert.
the default value.
double value or default when conversion is not supported.
Converts value into doubles or returns null when conversion is not possible.
the value to convert.
double value or null when conversion is not supported.
Generated using TypeDoc
Converts arbitrary values into double using extended conversion rules:
Example
let value1 = DoubleConverter.toNullableDouble("ABC"); // Result: null let value2 = DoubleConverter.toNullableDouble("123.456"); // Result: 123.456 let value3 = DoubleConverter.toNullableDouble(true); // Result: 1 let value4 = DoubleConverter.toNullableDouble(new Date()); // Result: current milliseconds