UNPKG

@kumarshanu/string-to-boolean

Version:

it converts a given string value to a boolean value. It handles various cases such as 'true', 'false', 'yes', 'no', '1', '0', null, and undefined. It uses a switch statement with case-insensitive comparisons to determine the boolean value. If none of the

3 lines (2 loc) 115 B
declare function stringToBoolean(stringValue: string | null | undefined): boolean; export default stringToBoolean;