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

12 lines (11 loc) 227 B
{ "compilerOptions": { "target": "es5", "module": "commonjs", "outDir": "dist", "declaration": true, "strict": true }, "include": ["src"], "exclude": ["node_modules", "dist"] }