Converts value into boolean or returns false when conversion is not possible.
the value to convert.
boolean value or false when conversion is not supported.
Converts value into boolean or returns default value when conversion is not possible
the value to convert.
the default value
boolean value or default when conversion is not supported.
Converts value into boolean or returns null when conversion is not possible.
the value to convert.
boolean value or null when convertion is not supported.
Generated using TypeDoc
Converts arbitrary values to boolean values using extended conversion rules:
Example
let value1 = BooleanConverter.toNullableBoolean(true); // true let value2 = BooleanConverter.toNullableBoolean("yes"); // true let value3 = BooleanConverter.toNullableBoolean(123); // true let value4 = BooleanConverter.toNullableBoolean({}); // null